User Tools

Site Tools



SNMPD - Simple Network Management Protocol Daemon to respond to SNMP requests MRTG - Multi Router Traffic Grapher

MRTG uses SNMPD to collect information on the Network Traffic of a Computer/ Router.

Setup Network Traffic Monitoring:

apt-get some tools and choose defaults:

apt-get install mrtg apt-get install snmpd //Daemon Storing Data apt-get install snmp //Daemon Collecting Data from various devices/servers

SNMPD Config on Client

Edit /etc/snmp/snmpd.conf and change the following: change: agentAddress udp: to: agentAddress udp:161

change: rocommunity public default -V systemonly to: # rocommunity public default -V systemonly

change: #rocommunity public localhost to: rocommunity public localhost

add: rocommunity public ip.address.of.snmp.monitoring.server

Removing as it was old sarge/etch config com2sec paranoid default public #com2sec readonly default public #com2sec readwrite default private to: <br> #com2sec paranoid default public com2sec readonly public #com2sec readwrite default private Edit /etc/default/snmpd and change the following: SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/' to SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/'

Restart the snmpd server: /etc/init.d/snmpd restart


Edit /etc/mrtg.cfg and add/replace with the following: # Global configuration WorkDir: /var/www/mrtg WriteExpires: Yes <br> #For every machine Targetname-of-machine: 2:public@ MaxBytesname-of-machine: 1250000 Titlename-of-machine: PageTopname-of-machine: <TABLE> <TR><TD>System:</TD><TD>kartbuilding on phidebian</TD></TR> <TR><TD>Maintainer:</TD> <TD>Stephen Burke</TD></TR> <TR><TD>Description:</TD><TD>Debian PC</TD></TR> <TR><TD>Max Speed:</TD><TD>10 Mbits/s</TD></TR> <TR><TD>Ip:</TD><TD></TD></TR> </TABLE> #Above table html info to be in 1 space.

Run mrtg manually a few time to place logs - it will give errors on first 3-5 runs. There is an entry placed in /etc/cron.d for mrtg to take over then. ./mrtg -c /etc/mrtg.cfg

In the “Target” line you see the number 2 we found before, and in “MaxBytes” we have set how many bytes the device maximum can transfer (10Mbit * 1000000bit/Mbit / 8byte/bit = 1250000byte).

Additional Info and Debugging

snmpd listens on ipaddress:161 where 161 is udp. The following iptables firewall rule is needed: iptables -A INPUT -p udp –dport 161 -j ACCEPT

Helpful Info To generate an Automatic mrtg config: cfgmaker public@ipaddress » /etc/mrtg.cfg

To check snmb Info: snmpwalk -v 1 -OS -c public localhost

Information got from: <br> <br> <br>


No final configs have been written.

snmpwalk on a UPS will not reveal all the information. Try the following to get more information: snmpwalk -v 1 -c public Network_Name_of_UPS .1

Here are the relevant links (rare) which have been found:<br><br><br><br><br>

snmpd_mrtg.txt · Last modified: 2022/07/19 21:13 by