Application performance monitoring with Hyperic HQ

App Watch

Article from Issue 102/2009
Author(s):

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.

Developers

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.

Installation

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 [1], 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).

Listing 1

Installing Hyperic

 

Target Host

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

Tuning

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:

/usr/local/hyperic/hyperic-hq-installer/installer-4.0.1/data/hqdb/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

/hq-server.sh start

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 [2], it is better to use the standalone agent installer.

First, download the HQ Agent installation package [1] 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.

Listing 2

The Agent Syncs with the Server

 

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Red Hat Updates JBoss SOA

    Linux provider Red Hat announces new versions of its JBoss Enterprise SOA Platform 4.3 and JBoss Operations Network 2.1.

  • JBoss AS 6.0 Now Available

    JBoss AS 6.0, a free Java EE 6 compliant application server, is now available.

  • Red Hat Releases JBoss ESB 4.2

    Red Hat Linux has just released JBoss ESB 4.2, a community variant of its JBoss middleware.

  • Netdata

    Netdata helps you monitor your network with ease through a cloud dashboard.

  • Red Hat Expands Developer Offerings with JBoss Developer Studio

    Red Hat today announced the global availability of JBoss Developer Studio, the first open source, Eclipse-based, integrated development environment combining tooling with runtime. JBoss Developer Studio provides a simple, powerful and easy-to-use solution for developers utilizing JBoss Enterprise Middleware. The solution provides a stable end-to-end, lifecycle environment for application development and deployment, enabling enterprises to respond more quickly and efficiently to rapidly changing business requirements.

comments powered by Disqus