Monitoring Petals ESB with Cacti

Introduction

Cacti is a complete monitoring and graphing tool to present historical data coming from monitoring probes.

Get more details about Cacti.

The integration of Petals ESB and Cacti is to get information about the JVM. This is done using SNMP probes.

Contributors
No contributors found for: authors on selected page(s)

Installation

Cacti installation

The Cacti integration was experienced on a Linux distribution "Ubuntu Precise Pangolin (12.04)".

Cacti is available in version 0.8.7i through the default Ubuntu repository. So, just install the package "cacti" using the standard way.

Enabling the SNMP agents of the Petals ESB JVMs

As the monitoring tools can use SNMP probes to get information from the JVM running Petals ESB, we need to enable the SNMP agent of the JVM of each Petals ESB node. On each Petals node, in the environment configuration file, uncomment the system properties relative to the SNMP agent:

# Uncomment following lines to enable SNMP agent of the JVM
PETALS_JAVA_OPTS="$PETALS_JAVA_OPTS -Dcom.sun.management.snmp.port=16161"
PETALS_JAVA_OPTS="$PETALS_JAVA_OPTS -Dcom.sun.management.snmp.interface=0.0.0.0"
PETALS_JAVA_OPTS="$PETALS_JAVA_OPTS -Dcom.sun.management.snmp.acl.file=/etc/petals-esb/default-snmp.acl"

Adjust your SNMP port, interface and ACL.

Caution, if Petals ESB runs with a user different from root, you need to use a port upper than 1024. To use a port lower than 1024 with a Petals ESB launches with a standard user, refers to the utility privbind (available in standard Ubuntu repository).
To use the same port on the same machine for several java processes, refers to snmpd used as proxy.
Caution, the ACL file should be accessible (read and write: 'chmod 600 xxx') only by the user running the JVM process.
If you use OpenJDK as Java virtual machine, you can't enable the SNMP agent. It is missing because of a non-free implementation. Move to the JVM provided by Oracle.

Cacti configuration

Import in your Cacti configuration the content of the attachment cacti_host_template_jvm_host.xml
Next, create the following datasource from templates:

Next, create your graphs from templates:

Monitoring

Monitoring the container

Monitoring the delivered messages of the local transporter

Metrics about delivered messages by the local transporter are available into the Petals container. A usage of these metrics can be the delivered messages by message exchange status whatever the endpoint, the service and the interface:
Unable to render embedded object: File (petals-delivered-messages.png) not found.

This is done using a simple script/command to collect metric values.

To create this graph, please follow the following steps:

  1. First, create a new Data Input Method:
    Unable to render embedded object: File (petals-container-localtransporter-dim.jpg) not found.
    Cacti monitoring extension of Petals CLI is used to get metric values. See the documentation of [Petals CLI] for more information.
    In the Input String, you will put the command line arguments to connect to the the Petals node for which you want to graph the delivered messages of the local transporter. That's why the command line contains: <petals_host>, <petals_jmx_port>, <petals_jmx_user> and <petals_jmx_password>.
  2. Add an input field for your Petals node hostname
    Unable to render embedded object: File (petals-container-localtransporter-dim-petals-host.jpg) not found.
    As the Petals node hostname can be automatically set from the hostname of the monitored host, the field Special Type Code is set.
  3. Add others input fields
    Unable to render embedded object: File (petals-container-localtransporter-dim-petals-jmx-port.jpg) not found.
    As for the JMX port, create an input field for the Petals JMX username and the Petals JMX user password.
  4. Add the output fields returned by the script
    For each message exchange status "Active", "Done" and "Error", create an output field:
    Unable to render embedded object: File (petals-container-localtransporter-dim-output-active.jpg) not found.
  5. Check that you have the following Data Input Method:
    Unable to render embedded object: File (petals-container-localtransporter-dim-full.jpg) not found.
  6. Create a new Data Template:
    Unable to render embedded object: File (petals-container-localtransporter-dt.jpg) not found.
    Select your data input method previously created as Data Input Method.
    Add your first data item associated to the number of delivered messages for message exchange status 'Active'. The data source type of the item is COUNTER.
  7. Create two others data items associated to the number of delivered messages for message exchange status 'Done' and 'Error'
    Unable to render embedded object: File (petals-container-localtransporter-dt-items.jpg) not found.
  8. A new block Custom data appears, check Use Per-Data Source Value for all except for the Petals node hostname
    Unable to render embedded object: File (petals-container-localtransporter-dt-custom.jpg) not found.
  9. Create a new Graph Template:
    Unable to render embedded object: File (petals-container-localtransporter-gt.jpg) not found.
  10. Add a Graph Item to displayed graph the number of delivered messages for message exchange status 'Active'
    Unable to render embedded object: File (petals-container-localtransporter-gt-active.jpg) not found.
  11. Add a Graph Item to displayed the legend of the number of delivered messages for message exchange status 'Active'
    Unable to render embedded object: File (petals-container-localtransporter-gt-active-legend.jpg) not found.
  12. Add others Graph Items associated to the number of delivered messages for message exchange status 'Done' and 'Error'
    Unable to render embedded object: File (petals-container-localtransporter-gt-full.jpg) not found.
  13. Create a New Graph
    Unable to render embedded object: File (petals-container-localtransporter-ng.jpg) not found.
  14. Set parameters needed to the Data Input Method
    Unable to render embedded object: File (petals-container-localtransporter-ng-params.jpg) not found.

The new graph can be viewed after several minutes needed to collect data. By default a collect is done every 5 minutes. To view the graph, go into *Graph management"

Monitoring the delivered messages of the the local transporter to a dedicated endpoint

Unable to render embedded object: File (petals-delivered-messages-by-endpoint.png) not found.

This is done using a data query to collect metric values. The data query definition to put in the XML file is:

<interface>
        <name>Get Delivered Messages by the Local transporter to an endpoint</name>
        <script_path>/home/cdeneux/petals-cli-2.1.1-SNAPSHOT/bin/petals-cli.sh</script_path>
        <arg_prepend>-h localhost -n 7700 -u petals -p petals -c -- monitoring -o local-transporter -f delivered-messages</arg_prepend>
        <arg_index>-- --list-endpoints</arg_index>
        <arg_query>-- --query-endpoints</arg_query>
        <arg_get>-- --query-endpoints</arg_get>
        <output_delimeter>!</output_delimeter>
        <index_order>endpointName</index_order>
        <index_order_type>alphanumeric</index_order_type>
        <!--index_title_format>|chosen_order_field|</index_title_format-->

        <fields>
                <endpointName>
                        <name>Endpoint name</name>
                        <direction>input</direction>
                        <query_name>NAME</query_name>
                </endpointName>
                <activeDeliveredMsgs>
                        <name>Active Message exchange delivered counter</name>
                        <direction>output</direction>
                        <query_name>ACTIVE</query_name>
                </activeDeliveredMsgs>
                <doneDeliveredMsgs>
                        <name>Done Message exchange delivered counter</name>
                        <direction>output</direction>
                        <query_name>DONE</query_name>
                </doneDeliveredMsgs>
                <errorDeliveredMsgs>
                        <name>Error Message exchange delivered counter</name>
                        <direction>output</direction>
                        <query_name>ERROR</query_name>
                </errorDeliveredMsgs>
        </fields>
</interface>

Don't forget to adapt the path of Petals CLI to your installation. Petals CLI is used to collect data. See the documentation of [Petals CLI] for more information.

To create this graph, please follow the following steps:

  1. First, create a new Data Query:
    Unable to render embedded object: File (petals-container-localtransporter-itf-dq.jpg) not found.
  2. Go to the device for which you want collect metric values, and associate it to the data query previously created
    Unable to render embedded object: File (petals-container-localtransporter-itf-device-associate.jpg) not found.
  3. Create a new Data Template:
    Unable to render embedded object: File (petals-container-localtransporter-itf-dt.jpg) not found.
    Select "Get Script Data (Indexed)" as Data Input Method.
    Add your first data item associated to the number of delivered messages for message exchange status 'Active'. The data source type of the item is COUNTER.
  4. Create two others data items associated to the number of delivered messages for message exchange status 'Done' and 'Error'
    Unable to render embedded object: File (petals-container-localtransporter-itf-dt-items.jpg) not found.
  5. A new block Custom data appears, check Use Per-Data Source Value for all
    Unable to render embedded object: File (petals-container-localtransporter-itf-dt-custom.jpg) not found.
  6. Create a new Graph Template:
    Unable to render embedded object: File (petals-container-localtransporter-itf-gt.jpg) not found.
  7. Add a Graph Item to displayed graph the number of delivered messages for message exchange status 'Active'
    Unable to render embedded object: File (petals-container-localtransporter-itf-gt-active.jpg) not found.
  8. Add a Graph Item to displayed the legend of the number of delivered messages for message exchange status 'Active'
    Unable to render embedded object: File (petals-container-localtransporter-itf-gt-active-legend.jpg) not found.
  9. Add others Graph Items associated to the number of delivered messages for message exchange status 'Done' and 'Error'
    Unable to render embedded object: File (petals-container-localtransporter-itf-gt-full.jpg) not found.
  10. Go to the data query previoulsy created, and associate it the just create graph template
    Unable to render embedded object: File (petals-container-localtransporter-itf-dq-associate.jpg) not found.
  11. Associate outputs of the data query to the graph items
    Unable to render embedded object: File (petals-container-localtransporter-itf-dq-associate-output.jpg) not found.
    Don't forget to check boxes.
  12. Go to the device for which you want to create the graph, and Create Graphs for this Host
    Unable to render embedded object: File (petals-container-localtransporter-itf-ng.jpg) not found.
    Select yours endpoints for which you want create a graph

The new graph can be viewed after several minutes needed to collect data. By default a collect is done every 5 minutes. To view the graph, go into *Graph management"

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.