View FAQ

[ Return To FAQ Index | Search The FAQs ]

FAQ Database : Nagios : Integration With Other Software

Title:Sending SNMP traps to a management host
FAQ ID:F0028
Submitted By:Ethan Galstad 
Last Updated:06/02/2009


User would like to have Nagios send SNMP traps to a management host when host and service alerts occur.



The best method for doing this is by using host and service event handlers.

Nagios relies on plugins to handle the gathering of service and host information and event handler scripts to handle events that occur with services and hosts. If you want to have Nagios send an SNMP trap to a management host in the event that a particular service has a problem, you will have to write a service event handler script and add it to the event_handler option of the service definition. If you have the NET-SNMP package installed on your host, you could have the script call the snmptrap command to actually send a trap message, depending on what type of service event occurred. Read the documentation section that deals with event handlers to get a better idea of how to write a script.

The Nagios MIB to generate trap information is available at Nagios Plugins.


Related FAQs:
F0029Receiving SNMP traps
Keywords:snmp trap event handler