Application performance monitoring with Hyperic HQ
Monitor a Java application server with Hyperic HQ.
Hyperic HQ is an open source enterprise monitoring suite that includes all the essential features of an enterprise monitoring tool. What sets Hyperic apart from other open source suites is its ease of configuration and its focus on application layer performance metrics. Monitoring custom application servers, databases, and web servers is often a tedious task that requires a lot of custom retrofitting. Hyperic breaks the mold by letting you collect application-specific performance metrics automatically using a system of logical defaults.
The days of only monitoring system-level services and network connectivity are over. Hyperic belongs to a new breed of monitoring tools that can peer into complex application stacks. Hyperic HQ excels at monitoring applications and providing performance statistics for the most common application servers, database servers, web servers, network devices, and applications. Hyperic is an excellent choice for monitoring a Java application server, such as a JBoss server system.
Javier Soltero, Doug MacEachern, Ryan Morgan, Charles Lee, and John Sachs founded Hyperic in 2004 when they moved from Covalent. They created Hyperic HQ based on their prior work developing Covalent Application Manager, which they purchased from Covalent. Doug is one of the original developers for the mod_perl project and also a contributor to the Apache httpd project.
Hyperic HQ monitors hosts with the use of an agent-based model; a Java-based agent is installed on target hosts that collect data and feed the information to a management server. Hyperic provides easy-to-configure installers for Linux, Windows, Mac OS X (PPC), and Solaris. Java 1.4+ is required for the management server and agents. Because Hyperic is a Java-based monitoring application, it can run on any platform that supports Java.
Hyperic provides the option of installing with a bundled Java Runtime Engine (JRE) to avoid having to download and instal a JRE or Java Development Kit (JDK), although you also have the option of using almost any JRE or JDK.
To start the easy installation, first download the HQ Installer , which provides the server, agent, and JRE required for a full Hyperic monitoring solution. Then select the installation package that most closely resembles the target system's operating system. If the system on which you are installing Hyperic is not listed on this page, choose Platform independent – no JRE and make sure a supported JRE/JDK is present on the target system.
Next, open a terminal as root and create a hyperic user and directory to deploy the server installation. Make sure that the hyperic user's home directory is owned by hyperic:
# mkdir /usr/local/hyperic # useradd hyperic -d /usr/local/hyperic # chown hyperic:hyperic /usr/local/hyperic
Now unzip the Hyperic installation tarball in /usr/local/hyperic:
$ tar -xvzf hyperic-hq-installer-4.0.2-939-x86-linux.tgz
Note that if you use the Hyperic tarball for the installation, you might need to add the init or rc scripts manually to start the Hyperic server or agents automatically at boot time.
The unzipping process creates a directory called hyperic-hq-installer in which the installation sources reside. Now you can cd to this directory and execute the setup shell script:
cd hyperic-hq-installer ./setup.sh
When the prompt asks you which portion of the Hyperic suite to install, choose the first option to install the server only. Later, the agent will be installed on a separate host. After you press Enter, the Hyperic installer will automatically configure the database, networking, and other configuration parameters required for the Hyperic server (Listing 1).
01 Loading install configuration... 02 Install configuration loaded. 03 Preparing to install... 04 Validating server install configuration... 05 Checking server webapp port... 06 Checking server secure webapp port... 07 Checking server JRMP port... 08 Checking server JNP port... 09 Verifying admin user properties 10 Validating server DB configuration... 11 Installing the server... 12 Unpacking server to: /usr/local/hyperic/server-4.0.1... 13 Creating server configuration files... 14 Copying binaries and libraries to server installation... 15 Copying server configuration file... 16 Copying server control file... 17 Copying server binaries... 18 Copying server libs... 19 Setting up server database...
In this article, the target machine on which the agent is installed is intended to model the high-performance Linux and Java application servers you might find in a high-volume, high-traffic website. Specifications are:
- Red Hat Enterprise Linux 5
- 1GB RAM
- Application: JBoss Application Server 4.2.3.GA
- Java JDK 6 Update 11
Next, a prompt will ask you to run a tuning script, which sets up the proper shared memory settings to run the built-in Hyperic database. (Because the tuning script is not necessary for all operating systems, however, the prompt will only appear on systems that require the script.) To make sure the installer is not terminated, open another terminal window, run the tuning script as root in the new terminal window, return to the original installer terminal window, and press Enter to resume the installer once the script has executed.
Next, log in to another terminal as root and execute the script tune-os.sh:
After you run the script, press Enter to continue the installation. If all goes well, a message will tell you that the installation completed successfully.
Next, go to the /usr/local/hyperic/server-4.0.1/bin directory and run the command
to start your HQ server. When the HQ server starts up for the first time, it might take several minutes to initialize. Subsequent startups will be much faster.
Once the HQ server reports that it has started successfully, you can log in to your HQ server at http://10.10.1.22:7080/ with the following credentials:
username: hqadmin password: hqadmin
To change your password, log in to the HQ server, click the Administration link, choose List Users, then click on the hqadmin user.
If you have any problems with the installation, you will find an installer log file at /usr/local/hyperic/hyperic-hq-installer/installer-4.0.1/./hq-install.log.After authentication to the web user interface (Figure 1), the HQ dashboard will appear. Notice that no hosts are being monitored because the agent is not yet installed on any of the nodes.
Installing the Agent
The agent can run on almost any machine that supports Java. Agents with easy-to-use installation packages are available for Windows, Mac OS X, Linux, and Solaris, and a platform-independent version, which comes bundled with or without a JRE, can run on any operating system that supports Java.
Either install the agent with the server installer by selecting installation option 2, or deploy a standalone installation to save disk space. The standalone agent and the server installation differ in size by 94MB, so if you are deploying a large number of nodes with a tool such as Cfengine , it is better to use the standalone agent installer.
First, download the HQ Agent installation package  for the operating system on which the agent will be deployed. If your OS is not listed on the download page, select Platform Independent and make sure a supported JRE is present on the system. For this, I selected the 32-bit Linux tarball installer, but I could have used the Red Hat RPM because the target is a Red Hat Linux server.
Next, open a terminal as root and create a hyperic user and directory to deploy the agent installation. The hyperic user's home directory should be owned by hyperic.
# mkdir /usr/local/hyperic # useradd hyperic -d /usr/local/hyperic # chown hyperic:hyperic /usr/local/hyperic
Now unzip the Hyperic agent installation tarball in /usr/local/hyperic
$ tar -xvzf hyperic-hq-agent-4.0.2-939-x86-linux.tgz
and change directory to the unzipped installation:
$ cd hyperic-hq-agent-4.0.2
The first time the agent is executed, it will prompt the user for various configuration parameters, such as the IP address of the management server, and it will generate a configuration file that is used the next time the agent is started. Most of the defaults can be accepted as is or changed according to the user's needs.
Now start the agent with the following command:
$ bin/hq-agent.sh start
Provided the networking information is correct and no firewall rules are interfering with the communication between your server and agent, the agent should quickly sync up with the server (see Listing 2). Once the agent is installed on the host, its services should be detected by the auto-discovery process of Hyperic HQ (Figure 2).
The currently running servers and services on the target host are automatically detected and made available for the monitoring inventory. Just select the services you want to monitor and click Add to Inventory. The HQ Server will begin collecting performance and availability data from the target host.
Now you can view the host in the Recently Added section of the dashboard or by navigating to the top menubar and clicking Resources | Browse.
NOTE: Please make sure all servers are synchronized with an NTP server; otherwise, you might have some difficulties viewing the graphs on target systems because of NTP drift.
The Agent Syncs with the Server
01 Starting HQ Agent. . . 02 - Unable to load agent token file. Generating a new one . . . Done 03 [ Running agent setup ] 04 What is the HQ server IP address: 10.10.1.22 05 Should Agent communications to HQ always be secure [default=no]: 06 What is the HQ server port [default=7080] 07 Testing insecure connection . . . Success 08 What is your HQ login [default=hqadmin]: 09 What is your HQ password: 10 What IP should HQ use to contact the agent [default=10.10.1.23]: 11 What port should HQ use to contact the agent [default=2144]: 12 Received temporary auth token from agent 13 Registering agent with HQ 14 HQ gave us the following agent token 15 1230453862315-22390840293-39928390561937 16 Informing agent of new HQ server 17 Validating 18 Successfully setup agent
Buy this article as PDF
Four-inch-long computer on a stick lets you boot a full Linux system from any HDMI display device.
New statute would require companies to report break-ins to consumers.
Weird data transfer technique avoids all standard security measures.
FIDO alliance declares the beginning of the end for old-style login authentication.
The Linux New Media Awards have honored the most significant products, projects, people, and organizations for open source/Linux every year since 2000.
Legendary Uber-distro splits over the systemd controversy.
New LTS version offers many refinements for the Cinnamon and Mate desktops and significant improvement under the hood.
One of CeBIT’s most successful forums returns in 2015.
A new study says it is possible to unmask 81% of TOR users.
Redmond joins the revolution by turning the .NET Core Runtime into a GitHub project.