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 (18)

View Page History

The integration of Petals ESB and Nagios is based on getting information about the JVM. This is done using SNMP probes.
{info}Following examples are based on a Petals ESB topology composed of two nodes on the same host.{info}


h1. Installation

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

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

{code}
We recommand to define specific Nagios command to interact with the Java virtual machine MIB.

According to our environement defined our environment defined above, create the file 'jvm.cfg' in the directory '/etc/nagios-plugins/config' with the following content:

{code}
{color:#333333}A best practice to monitor Petals ESB nodes is to create a template 'Petals ESB host' that inherites from the 'JVM host'.{color}

{color:#333333}According to our environement defined above, create the file 'petals-host-nagios2.cfg' in the directory '/etc/nagios3/conf.d' with the followin content:{color}
{color:#333333}According to our {color}{color:#333333}environment defined above, create the file 'petals-esb-host-nagios2.cfg' in the directory '/etc/nagios3/conf.d' with the following content:{color}

{code}
define host{
        use                             jvm-host
        name                            petals-esb-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_options            d,u,r
        contact_groups                  admins
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!

# Specific attributes
        _snmpport                       161     ; Listening port of the JVM SNMP agent
        }
{code}


h2. {color:#492562}{*}Defining your Petals ESB hosts{*}{color}

For each Petals ESB node of your Petals ESB topology, create an instance of the template 'petals-esb-host'.

According to our environment defined above, create the file 'petals-esb-host-node1.cfg' in the directory '/etc/nagios3/conf.d' with the following content:

{code}
define host{
        use                     petals-esb-host            ; Name of host template to use
        host_name               petals-esb-node-1
        alias                   Petals ESB Node 1
        address                 127.0.0.1
        _snmpport               16161 ; This value should be set with the SNMP
; agent listener port of your Petals ESB node.
        }
{code}and create the file 'petals-esb-host-node2.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
{code}
define host{
        use                     petals-esb-host            ; Name of host template to use
        host_name               petals-esb-node-2
        alias                   Petals ESB Node 2
        address                 127.0.0.1
        _snmpport               16162 ; This value should be set with the SNMP
; agent listener port of your Petals ESB node.
        }
{code}

h2. {color:#492562}{*}Defining your Petals ESB topology as a Petals ESB host group{*}{color}

The Petals ESB topology can be considered as a Nagios host group composed of your Petals ESB nodes.

So, according to our environment defined above, create the file 'petals-esb-hostgroup.cfg' in the directory '/etc/nagios3/conf.d' with the following content:

{code}
define hostgroup {
        hostgroup_name petals-esb
        alias           Petals ESB
        members         petals-esb-node-1, petals-esb-node-2
        }
{code}

h2. Petals ESB host services

{color:#333333}A best practice to monitor Petals ESB nodes is to create a template of services to associate to each Petals ESB nodes.{color}

{color:#333333}According to our environement defined above, create the file 'petals-esb-services.cfg' in the directory '/etc/nagios3/conf.d' with the following content:{color}
{column}
{column:width=350px}