Host SNMP Configuration

From Technologia Incognita
Jump to: navigation, search

First install Net-SNMP :

root@ubuntu:~# apt-get install snmpd
Ubuntu: make sure the SNMPDOPTS line in /etc/default/snmpd looks like this

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -p /var/run/'

This also disables logging and as such gets rid of annoying "features" like
snmpd[4990]: Connection from UDP:

Replace the default /etc/snmp/snmpd.conf file with something like this, changing the community, location and contact fields

com2sec readonly default techinc
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation Louwesweg 1
syscontact Network Team
#This line allows Observium to detect the host OS if the distro script is installed
extend . distro /usr/bin/distro

Get the observium 'distro' script to identify your distribution via SNMP

mv distro /usr/bin/distro
chmod 755 /usr/bin/distro

You should then be able to restart snmpd

root@server:~# /etc/init.d/snmpd restart

And then add the device to your Observium installation!

On devices with a large routing table

You may encounter sloppy SNMP responsiveness and high host load with too many routes installed in combination with netsnmp. Also see this Debian bugreport of a few years back. The last post seems to fix this issue, so if you are running full table, add these lines to snmpd.conf as well:

view all included .1 80
view all excluded .
view all excluded .
view system included