From Wiki
Jump to: navigation, search

Installing snmpd on the monitored machine

et1-etch:~# aptitude install snmpd

Configuring snmpd

Edit the snmp configuration to poll the data:

vi /etc/snmp/snmpd.conf
com2sec readonly  default         public
com2sec mynetwork public
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork

Edit the default configuration to allow network connections

vi /etc/default/snmpd
# snmpd options (use syslog, close stdin/out/err).
# SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/ '

Restart snmpd

et1-etch:~# /etc/init.d/snmpd restart
Restarting network management services: snmpd.

Configure MRTG on the monitoring machine

apt-get install mrtg

You can manually or automatically generate the configuration file for mrtg. I would recommend doing it automatically as it is a lot easier. Issue the following command:

cfgmaker --global 'WorkDir: /var/www/mrtg'  --global "Options[_]: growright, bits"  --output /tmp/mrtg.cfg public@

This will generate the configuration file. You then need to make an index file which contains a list of all of your interfaces. Issue the following command:

indexmaker /tmp/mrtg.cfg  --output /var/www/mrtg/et1.html

We can specify what we want as tittle:

 --section h1|title|name|description|portname

Let's merge the config with the mrtg config:

cat /tmp/mrtg.conf >> /etc/mrtg.conf

Run mrtg from coomand line twice or three times to create the files


Polling a Dell switch

snmp-server enable traps
snmp-server community dell ro