Monitoring your Map 4 server

Centreon provides a plugin pack and a plugin to monitor your Map 4 server.

Installing the plugins

Access, through SSH, the poller which will be monitoring your Map 4 server. Install all the required plugins through the following commands :

For Centreon 2.8.X

# yum install centreon-pack-operatingsystems-linux-snmp
# yum install centreon-pack-applications-monitoring-centreon-map4-jmx
# yum install centreon-pack-applications-webservers-tomcat-jmx

# yum install centreon-plugin-Operatingsystems-Linux-Snmp
# yum install centreon-plugin-Applications-Monitoring-Centreon-Map4-Jmx
# yum install centreon-plugin-Applications-Webservers-Tomcat-Jmx

## OPTIONAL - Only if you have a local MySQL DB for your Map server

# yum install centreon-pack-applications-databases-mysql
# yum install centreon-plugin-Applications-Databases-Mysql

For Centreon 2.7.X

# yum install ces-plugins-Operatingsystems-Linux-Snmp
# yum install ces-plugins-Applications-Monitoring-Centreon-Map4-Jmx.noarch
# yum install ces-plugins-Applications-Webservers-Tomcat-Jmx.noarch

# yum install ces-pack-Operatingsystems-Linux-Snmp
# yum install ces-pack-Applications-Monitoring-Centreon-Map4-Jmx.noarch
# yum install ces-pack-Applications-Webservers-Tomcat-Jmx.noarch

## OPTIONAL - Only if you have a local MySQL DB for you Map server

# yum install ces-plugins-Applications-Databases-Mysql
# yum install ces-pack-Applications-Databases-Mysql

Configure Jolokia

In order to monitor your tomcat, you need to deploy the jolokia application on it.

Download the jolokia war agent and put it on your Map 4 server. The agent can be found here

You can do all that with the following command:

For tomcat 6

# wget  http://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-war/1.3.5/jolokia-war-1.3.5.war -O /var/lib/tomcat6/webapps/jolokia.war

For tomcat 7

# wget  http://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-war/1.3.5/jolokia-war-1.3.5.war -O /var/lib/tomcat/webapps/jolokia.war

Warning

Please adapt the download URL depending on the current Jolokia version

Configure your database

Access your MySQL server where the Map database is stored (the Map database is called ‘centreon_studio’ by default).

Execute the following commands:

# mysql centreon_studio
# GRANT SELECT ON centreon_studio.* TO 'centreon_map'@'<POLLER_IP>';
  • Replace ‘centreon_studio’ by the DB name of your Map 4 server
  • Replace <POLLER_IP> by the IP address of the poller which will be monitoring your DB
  • Replace ‘PASSWORD’ by any password you want (obviously...)

Configure your services

Access your Centreon Web interface. Go to Configuration -> Host -> Add

Fill the basic information about your host and add the following Host Templates:

  • OS-Linux-SNMP-custom
  • App-Monitoring-Centreon-Map4-JMX-custom
  • App-Webserver-Tomcat-JMX-custom

Also add the following only if you have a local MySQL DB on you Map server:

  • App-DB-MySQL-custom
../_images/map4-host-configuration.png
  1. These are the 3 main templates you need to monitor your Map 4 server

  2. The MySQL template is useful only if you have a MySQL server on your Map 4 server (for Centreon Map database)

  3. Enter the Jolokia URL, which is composed as follow :

    For HTTP configuration

    http://<MAP4_IP>:8080/jolokia

    For HTTPS configuration

    https://<MAP4_IP>:8443/jolokia

    Note

    Replace <MAP4_IP> by the IP address of your Map 4 server

  4. If you have a MySQK server on your Map 4 server, enter the user / password you used in Configure your database.

Note

Don’t forget to check the “« Create Services linked to the Template too » checkbox.

You can now export your configuration and your Map 4 server will be monitored.

../_images/map4-services.png