snmpd agent sends duplicate traps

Posted by jsnmp on Ask Ubuntu See other posts from Ask Ubuntu or by jsnmp
Published on 2012-12-10T16:18:51Z Indexed on 2012/12/10 17:30 UTC
Read the original article Hit count: 420

Filed under:
|

I am on Ubuntu 10.04.4 LTS, and I cannot upgrade to a higher version.

I have installed the snmpd agent (NET-SNMP version 5.4.2.1) with an apt-get install snmpd command.

When an event occurs which sends a trap, two traps are sent for each such event instead of one.

For example, when I shut down the agent with command /etc/init.d/snmpd stop, two shutdown traps are sent to the destination host. If I then start back up the agent with command /etc/init.d/snmpd start, then two cold start traps are sent to the destination host.

Is this a known issue? Is there a fix for this, or is there a configuration change that is needed to prevent the sending of the duplicate trap?

These are the contents of the /etc/snmp/snmpd.conf file:

rocommunity public
authtrapenable 1
trap2sink <trap destination hostname>  public

These are the contents of the /etc/default/snmpd file:

# This file controls the activity of snmpd and snmptrapd
# MIB directories.  /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/mibs

# snmpd control (yes means start daemon).
SNMPDRUN=yes

# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Ls3d -Lf /dev/null -u snmp -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'

# snmptrapd control (yes means start daemon).  As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run.  See snmpd.conf(5) for how to do this.
TRAPDRUN=no

# snmptrapd options (use syslog).
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

# create symlink on Debian legacy location to official RFC path
SNMPDCOMPAT=yes

© Ask Ubuntu or respective owner

Related posts about duplicate

Related posts about snmp