Monitoring with SNMP traps

Required package SNMPTT

1. Install the snmptt program on the nagios master server.

2. Enable snmptrapd. The snmptrapd.conf contains this line:

traphandle default /usr/sbin/snmptt 

It makes all trap go to snmptt for processing.

3. config snmptt by editing the /etc/snmp/snmptt.ini file.

4. Define what actions to take (what program to run) in /etc/snmp/snmptt.conf. For details, please look at sample config and documentation. In short the snmptt.conf file is created by using the snmpttconvertmib program. After the conf is created, we edit it to make it suitable for nagios; only the EVENT and EXEC is important for our config method.

Because the hostname in nagios config is not FQDN, so we need to hardcode the hostname to ip address mapping in /etc/hosts, like this:

1.2.3.4  host1
5.6.7.8  host2

Enable SNMP trap for Windows

To make Windows to send snmp trap: go to services in control panel, open the snmp service, open the traps tab, enter the community and trap destinations. The community can be anything, eg. 'public', the trap destinations should be the nagios master server.

Enable SNMP trap for Linux

To make linux to send snmp trap, add these lines to /etc/snmp/snmpd.conf:

	# where to send v2 traps:
	trap2sink       nagios.example.com  public
	# send traps on authentication failures
	authtrapenable  1
nagios/monitoring_with_snmp_traps.txt · Last modified: 2010-02-23 16:00 by admin
Back to top
GNU Free Documentation License 1.2
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0