
Adding the default option tells the daemon that this is the default way to handle all incoming traps.

#PERL SNMP TRAP RECEIVER EXAMPLE HOW TO#
The traphandle directive tells the snmptrapd daemon how to handle incoming traps and where to send them. Traphandle default /usr/sbin/snmptthandler This will make snmptrapd pass OIDs in numeric form and prevent SNMPTT from having to translate the symbolic name to numerical form." Make sure to remove the -c /etc/snmp/nf part, otherwise you will receive TRAP twice, as snmptrapd' is compiled with the default configuration file path being already set to '/etc/snmp/nf'.Īs quoted from SNMP Trap Translator documentation: "The -On is recommended. OPTIONS="-On -Lsd -p /var/run/snmptrapd.pid" #OPTIONS="-On -Lsd -c /etc/snmp/nf -p /var/run/snmptrapd.pid" The trap is then out-put to Nagios as a passive check result. If the trap matches, SNMPTT will see if the translated trap definition contains logic to output it to Nagios and execute that logic. The SNMPTT tool will then try to match the incoming trap against the collection of trap definitions that it has translated. When incoming traps are received from the snmptrapd daemon, they are passed to the SNMPTT tool.
#PERL SNMP TRAP RECEIVER EXAMPLE INSTALL#
# yum install net-snmp net-snmp-libs net-snmp-utils net-snmp-perl perl-Net-SNMP net-snmp-develĬonfiguring and Running the snmptrapd Daemon Installing Net-SNMP packages on Centos 5.5 On Red Hat, SuSE, Debian, and Mandrakeĭistributions, the required packages are called net-snmp, net-snmp-libs, and net-snmp-utils. Indeed, it may already be installed on your system or you may be able to install it via your distribution’s package management system, such as yum, apt, or the like.

The Net-SNMP package is available as a series of installable packages on many distributions. Mib definition files for the equipment or software you need to monitor. For example, an authentication event or the change in status of an interface on a router may generate an SNMP trap that is sent to a management station of some sort, such as HP OpenView, CiscoWorks, Nagios.ĥ.

The traps con-tain information about the status or an event on an SNMP-enabled device. SNMP traps are alerts and notifications generated by SNMP-enabled devices.
