Configure Tomcat's Plugin in Nagios (Ubuntu)
In this post, we demonstrate how to monitor Apache Tomcat 7 using Nagios on Ubuntu 14.04.
We assume that nagios server has been configured on the address nagios.your_host_name.com
as described in the following guide:
First, download the Tomcat plugin into /usr/lib/nagios/plugins/
directory (into your nagios server). You should also see all other plugins in the /plugins
directory.
Rename the plugin from check_tomcat.pl
to check_tomcat
.
Just to be on the safe side, install a XML dependency that is used by the tomcat plugin using
Second, append the following lines in the file /etc/nagios3/command.cfg
Third, add the following service definition in the host that you want to check if Tomcat is running. In our case we will use localhost. Replace localhost with your desired host.
Finally, restart nagios using
sudo service nagios3 restart
Wait 5 minutes and then check Nagios’s web interface.