Reporting Nagios data to BMC Patrol
In a past question, "Is it possible to integrate Nagios with BMC Patrol?", you mentioned that you could do such a thing. What is the process for configuring Nagios to send the information that Nagios gathers from our Linux servers, and have it reported to BMC Patrol?

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Cathleen A. Gagne, Senior Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Here are the instructions:

  1. Configure Nagios to generate SNMP traps for any alerts you wish to send to Patrol. I use the snmptrap application that comes with Net-SNMP to do this, combined with a global or service-specific event handler. Or you could configure Patrol to be one of your standard notification methods, like email, pager or mobile phone. Below is an example of a SNMP trap that combines OIDs and Nagios macros that could be sent to Patrol. This will almost certainly need to be modified to suit your environment.
    define command {
        command_name                       notify-pem-service-trap
        command_line                        /usr/bin/snmptrap -d -v 1 -c
    public pemprod.testing.com .1.3.6.1.4.1.2789.2005 '' 6 ''
     '' .1.3.6.1.4.1.2789.2005.1 s "Notification Type: $NOTIFICATIONTYPE$"
    .1.3.6.1.4.1.2789.2005.2 s "Service: $SERVICEDESC$" .1.3.6.1.4
    .1.2789.2005.3 s "Host: $HOSTALIAS$" .1.3.6.1.4.1.2789.2005.4 s
    "Address: $HOSTADDRESS$" .1.3.6.1.4.1.2789.2005.5 s "State: $SERVICES TATE$" .1.3.6.1.4.1.2789.2005.8 s "DateTime: $SHORTDATETIME$"
    .1.3.6.1.4.1.2789.2005.7 s "Additional Info: $SERVICEOUTPUT$"
    }
    
  2. Configure BMC Patrol to receive and process the incoming trap and assign the data to the relevant host and service being monitored. You will generally need to send at least the hostname, service, service state and any relevant host or service output to BMC Patrol.

This was first published in June 2007