Monitoring Tomcat 5.0 on Ubuntu

Want to support HowtoForge? Become a subscriber!
 
Submitted by staceyeschneider (Contact Author) (Forums) on Thu, 2007-11-01 12:55. :: Ubuntu | Apache | Monitoring

Monitoring Tomcat 5.0 on Ubuntu  

This document describes how to set up and enable Hyperic HQ for monitoring on Ubuntu and Tomcat. The resulting system provides a comprehensive, web-based Systems Management Software. It's the next stage of classical monitoring and able to manage all kinds of operating systems, web servers, application servers and database servers. The install comes prepared to monitor almost 70 different technologies natively and provides many detailed features. For brevity sake, I won't list all of them here, so please take a look at http://www.hyperic.com/. Hyperic HQ is available as an open source distribution licensed under the GPL v2.

1 Preparation

1.1 Download the Hyperic HQ Software

Download the software from http://www.hyperic.com/downloads/. The software can also be downloaded from Sourceforge, however this location is easier because it provides an easy UI to selecting the right packages for the operating systems you are going to manage.

Hyperic names their files with the release version and build number incorporated in the file name. For the purposes of this document when referring to a file name we will usually use the letter ‘n’ in place of the release numbers. For example, hyperic-hq-agent-3.1.1-490-amd64-linux.tgz will appear as hyperic-hq-agent-n.n.n-nnn-amd64-linux.tgz.

For Ubuntu use <hyperic-hq-agent-n.n.n-nnn-x86-linux.tgz or for 64-Bit AMD Systems use hyperic-hq-agent-n.n.n-nnn-amd64-linux.tgz.

Note: Hyperic is a Java-based application, to install on an operating system that is not running Java, select hyperic-hq-agent-n.n.n-nnn-noJRE.tgz and install a Java Runtime Environment separately.

1.2 Install the Hyperic HQ Server

You are not allowed to install Hyperic HQ as root, and the installer does not auto-create the installdir. So you have to create it yourself and change the owner to your username:

sudo mkdir /home/hyperic
sudo chown %yourusername%:%yourusername%/home/hyperic

Note: The installdir can be any directory you want, however be sure that you are permitted to write to it.

Run the installer:

./hyperic-hq-installer/setup.sh

Select the software you wish to install. Even if your Tomcat Server is running on a separate machine from your Hyperic HQ Server, it is always a good idea to install an agent on the HQ Server machine as well. So, for the Server install, select both server and agent:

Select server and agent: 1,3

Note: If you have a running HQ Server and want to monitor other machines, you only need to install the HQ Agent on them. It is available for all kinds of operating systems. Have a look at http://sourceforge.net/projects/hyperic-hq.

1.3 Install the HQ Server Agent

Enter the installation path. To choose the default, hit enter.

Note: HQ server and HQ agent will be installed isolated from each other in different subdirectories.

Open a second terminal and login as root and wait to be prompted to execute a script.

sudo /tmp/hyperic-hq-installer/installer-3.1.0/data/hqdb/tune-os.sh

Close the second terminal when finished and return to the first terminal with paused installation.

Hit enter to complete the installation process.

Check that the install-log has been saved to /tmp/hyperic-hq-installer/installer-3.1.0/hq-install.log

Note: Keep in mind that /tmp/ will be deleted if you shut down or reboot the system. So if you want to cast a glance on it later you have to copy it to another directory.

Hit enter to choose the default installation path for the HQ Server.

Enter the name of the name or ip of the smtp-server that HQ will use to send email messages. If you don't know your server, choose your local machine: localhost

1.4 Install the Agent on the Tomcat Machine

Repeat the steps to install the agent on the Tomcat machine. Be sure to download and install the appropriate agent for the operating system supporting your Tomcat server. For information on installing on additional operating systems, consult the Hyperic documentation.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.