MRTG

From Wiki
Jump to: navigation, search

Contents

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 172.16.121.1 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/snmpd.pid 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid '


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@172.16.121.134


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

mrtg


Polling a Dell switch

snmp-server enable traps
snmp-server community dell ro
Personal tools
Namespaces
Variants
Actions
Navigation
Content
Toolbox