Monitoring Petals ESB with Nagios

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (7)

View Page History



The integration of Petals ESB and Nagios is based on getting information about the JVM. This is done using SNMP probes.

{include:Enabling the SNMP agents of the Petals ESB JVMs}

h1. Nagios configuration


h2. JVM host template

A best practice to monitor Java application is to create a template 'JVM host'.

According to our environement defined above, create the file 'jvm-host-nagios2.cfg' in the directory '/etc/nagios3/conf.d' with the followin content:

{code}
define host{
     use                generic-host
        name                            jvm-host    ; The name of this host template
        notifications_enabled           1       ; Host notifications are enabled
        event_handler_enabled           1       ; Host event handler is enabled
        flap_detection_enabled          1       ; Flap detection is enabled
        failure_prediction_enabled      1       ; Failure prediction is enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts
        check_command                   check-host-alive
        max_check_attempts              10
        notification_interval           0
        notification_period             24x7
        notification_options            d,u,r
        contact_groups                  admins
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
# Specific attributes
    _snmp_port            161    ; Listening port of the JVM SNMP agent
        }
{code}

h2. Nagios commands definition to interact with a SNMP agent

define command{
    command_name    jvm_heapused
    command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -p '$ARG1$' -C '$ARG2$' -P '$ARG3$' -o 1.3.6.1.4.1.42.2.145.3.163.1.1.2.11.0 -w :'$ARG4$' -c :'$ARG5$' -l load
    command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -p '$HOSTSNMPPORT$' -C '$ARG1$' -P '$ARG2$' -o 1.3.6.1.4.1.42.2.145.3.163.1.1.2.11.0 -w :'$ARG3$' -c :'$ARG4$' -l load
    }

define command{
    command_name    jvm_heapmax
    command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -p '$ARG1$' -C '$ARG2$' -P '$ARG3$' -o 1.3.6.1.4.1.42.2.145.3.163.1.1.2.13.0 -w :'$ARG4$' -c :'$ARG5$' -l load
    command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -p '$HOSTSNMPPORT$' -C '$ARG1$' -P '$ARG2$' -o 1.3.6.1.4.1.42.2.145.3.163.1.1.2.13.0 -w :'$ARG3$' -c :'$ARG4$' -l load
    }
{code}
{panel:title=Contributors}{contributors:order=name|mode=list}{panel}
{column}
{section}HOSTSNMPPORT