2013-11-04 Get SNMP(v3) working on Ubuntu 12.04

I am running an Ubuntu 12.04 as working environment on my local machine. Ubuntu 12.04 is latest LTS (Long Term Support) version so that it's a good choice for a server. I need to install SNMP on my machine recently and I install it by following command

sudo apt-get install snmpd snmp

However it seems doesn't work. After checking the system log, I found the following errors in /var/log/syslog

 snmpd[8461]: /etc/snmp/snmpd.conf: line 90: Error: Already have an entry for this process.
 snmpd[8461]: /etc/snmp/snmpd.conf: line 92: Error: Already have an entry for this process.
 snmpd[8461]: /etc/snmp/snmpd.conf: line 94: Error: Already have an entry for this process.
 snmpd[8461]: /etc/snmp/snmpd.conf: line 106: Error: includeAllDisks already specified.
 snmpd[8461]: /etc/snmp/snmpd.conf: line 106: Error: #011ignoring: includeAllDisks 10%
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: error on subcontainer '' insert (-1)
 snmpd[8461]: /etc/snmp/snmpd.conf: line 146: Error: duplicate trigger name
 snmpd[8461]: /etc/snmp/snmpd.conf: line 148: Error: duplicate trigger name
 snmpd[8461]: /etc/snmp/snmpd.conf: line 148: Error: duplicate trigger name
 snmpd[8461]: duplicate table data attempted to be entered. row exists
 snmpd[8461]: Failed to register extend entry 'test1' - possibly duplicate name.
 snmpd[8461]: duplicate table data attempted to be entered. row exists
 snmpd[8461]: Failed to register extend entry 'test2' - possibly duplicate name.
 snmpd[8461]: Turning on AgentX master support.
 snmpd[8461]: Error opening specified endpoint "udp:127.0.0.1:161"
 snmpd[8461]: Server Exiting with code 1

The content of /etc/snmp/snmpd.conf is like

So let's fix the problem. I comment the snmpd.conf configurations appeared in syslog, then use command cat /etc/snmp/snmpd.conf | grep -v '#' | grep -v '^\s*$' to get a clean version.

After updated /etc/snmpd/snmpd.conf and /etc/init.d/snmpd restart, now it's working.

BTW, The i3 is the best tiling window manager I have ever used.

最后更新于

这有帮助吗?