Apache Tomcat With Nagios XI PDF
Apache Tomcat With Nagios XI PDF
Purpose
This document will cover how to monitor Apache Tomcat servers using the Apache Tomcat
wizard and check_tomcat.jar plugin within Nagios XI, so that users may be notified when
Java applications are behaving unexpectedly.
Target Audience
This document is intended for use by Nagios XI Administrators who want to monitor their Apache Tomcat
instances.
Prerequisites
This document is assumes you have the following:
• A remote Apache Tomcat server with JMX enabled
• A Nagios XI server with a network route to the Apache Tomcat server
The check_tomcat.jar monitoring plugin is executed either on the Nagios XI server or the Apache Tomcat
server. Either method requires some prerequisite steps to be followed first which are outlined below.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 1 / 7
Updated – June, 2018
The Industry Standard In Infrastructure Monitoring
Debian 8 / Ubuntu 14
To install OpenJDK 7 on Debian 8 / Ubuntu 14 execute the following commands:
apt-get update
apt-get install -y openjdk-7-jdk
apt-get update
apt-get install -y openjdk-8-jdk
Once these steps have been performed please proceed to the Configuration Wizard section of this document.
Once installed you will need to download the check_tomcat.jar plugin to the NCPA’s plugins folder. The
plugin can be downloaded directly from the Nagios XI server, in the following commands replace
xi_address with the IP address of your Nagios XI server. In a terminal session on the Tomcat server
execute the following commands:
cd /usr/local/ncpa/plugins/
wget http://xi_address/nagiosxi/includes/configwizards/java-as/plugins/check_jvm.jar
The check_tomcat.jar is a Java file that NCPA cannot run by default. To have NCPA associate .jar files
with Java you will need to add a line to the /usr/local/ncpa/etc/ncpa.cfg file.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 2 / 7
Updated – June, 2018
The Industry Standard In Infrastructure Monitoring
sudo vi /usr/local/ncpa/etc/ncpa.cfg
When using vi, to make changes press i on the keyboard first to enter insert mode and press Esc to exit
insert mode.
/[plugin
If you have several versions of java installed, you may want to use an absolute path to the binary in place of
java. If you need to load additional classes for your plugins (not required for JMX over RMI), you may want
to specify a classpath using -cp between -jar and $plugin_name.
The last step required is to restart the ncpa_listener service. The command to do this may vary
depending on your operating system (full details can be found in the Installing NCPA documentation). In this
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 3 / 7
Updated – June, 2018
The Industry Standard In Infrastructure Monitoring
Once these steps have been performed please proceed to the Configuration Wizard section of this document.
To begin using the Apache Tomcat configuration wizard, navigate via the top bar to Configure >
Configuration Wizards. Then, select the Apache Tomcat wizard. In the following screenshot you can see
how the search field allows you to quickly find a wizard.
Step 1 requires you to provide the details for the Nagios XI server to connect to Tomcat via JMX.
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 4 / 7
Updated – June, 2018
The Industry Standard In Infrastructure Monitoring
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 5 / 7
Updated – June, 2018
The Industry Standard In Infrastructure Monitoring
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 6 / 7
Updated – June, 2018
The Industry Standard In Infrastructure Monitoring
Once the wizard applies the configuration, click the View status details for <your host> link to see the new
services that have been created.
Finishing Up
This completes the documentation on how to monitor Apache Tomcat in Nagios XI.
If you have additional questions or other concerns, please visit us at our support forums:
https://support.nagios.com/forum
https://support.nagios.com/kb
1295 Bandana Blvd N, St. Paul, MN 55108 [email protected] US: 1-888-624-4671 INTL: 1-651-204-9102
www.nagios.com
© 2017 Nagios Enterprises, LLC. All rights reserved. Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or
registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner. Page 7 / 7
Updated – June, 2018