In this recipe, we'll learn how to configure Nagios Core to process Simple Network Management Protocol (SNMP) traps, information sent by monitored network devices to a central monitoring server.
Because SNMP traps often contain useful or urgent information about how a host is working, processing them in at least some way can be very helpful, particularly for firmware network devices that can't use send_nsca
to submit a passive check result in a standard form, as explained in the Submitting passive checks from a remote host with NSCA recipe.
As an example, most SNMP-capable hosts can be configured to send SNMP traps when one of their network interfaces changes state, perhaps due to a pulled network cable. These are known as linkUp
and linkDown
traps. Monitoring this particular kind of trap is especially useful for devices with a large number of interfaces, such as switches or routers.
Keeping track of these events in Nagios Core is valuable...