Installation
To retrieve all the data from Tomcat you will need:
- To have curl in the agent/ probe where the plugin will be launched. Pandora FMS Agent provides this utility.
- Have the permissions to ask the web service. (Firewall rules, user & password, etc.)
The role needed for the plugin to get the information from Tomcat is “manager-script”:
<user username="user" password="password" roles="manager-script" />
All the information is retrieved from the Tomcat manager application. Is mandatory to have it
enabled in order to monitor the service.
http://<Tomcat-IP-Address><Puerto>/manager/status?XML=true
http://<Tomcat-IP-Address><Puerto>/manager/text/list
Note: Tomcat’s default TCP Port: 8080
In case you could find any issue connecting to the service, you can add a new connector to the Tomcatserver. Following you can find a configuration example:
/etc/tomcat<version>/server.xml
Pandora FMS plugin for Tomcat service monitoring. Example configuration:
## User grants needed:
## v6 - manager-script
## v7 - manager-script
## v8 - manager-script
## v9 - manager-script
host=ahorcado.lab.artica.es
port=8080
user=admin
pass=pandora
## set to 1 if you use https instead of http
https=0
## if you want to ignore host:port config default, you could define a custom url:
#custom_url=http://myserver:myport/mymap/
## Module personalization
MODULE_GROUP=Tomcat
MODULE_TAGS=Network,Application
MODULE_INTERVAL=1
## Extra identifier (identifies the modules of current instance)
instance=T6
####### Personalize execution
## values 1 (tomcat version <= 6.X) or 0 (tomcat version > 6.X)
#compatibility_mode=1
#---------------------
#- monitoring status -
#---------------------
enable_application_scan=1
enable_status_monitoring=1
#personalize each section
enable_thread_monitoring=1
enable_requestInfo_monitoring=1
enable_workers_monitoring=1
#----------
#- vminfo -
#----------
enable_vminfo_memory_information=1
#JVM
enable_jvm_memory_monitoring=1
enable_jvm_memorypool_monitoring=1
As we had configured the file with the values corresponding to our environment, we can deploy the files to the Pandora FMS agent by using file collections.
It is a good practice to test the execution before deploy the plugin for first time.
Plugin execution configuration (agent configuration file):
module_plugin perl /path/to/file/pandora_tomcat.pl /path/to/file/pandora_tomcat.conf
Binary files are also deployed for Windows Pandora FMS agents (pandora_tomcat_x86.exe and
pandora_tomcat_x64.exe)
module_plugin /path/to/file/pandora_tomcat_xXX.exe /path/to/file/pandora_tomcat.conf