This wiki is now locked - both user registration and edits (except by admins) are disabled. We're currently migrating all the content to our new wiki. If you have time, please register and help us out!

You can still view the source code of every page. Once a page has been copied over to the new wiki, please add a link to it to MigratedPages (the only page which is still editable), to notify the admins to go and blank it.


["This is just a stub"]

From version 420 fred has a SNMP-Sgent (server) built in.
It operates at UDP port (4000).

The below OID:s are extremely temporary and might very well change.

.1.3.1.1.x.0 is for outgoing data (notice that the 0 looks like an O)
.1.3.1.1.x.1 is for incoming data (notice that the 1 looks like an I)

.1.3.1.1.0.n Total amount of incoming/outgoing data during the current run

.1.3.1.1.m.n Amount of incoming/outgoing data during the last (m*30)s-period before the current 30s-period
for instance: .1.3.1.1.9.1 is the amount of incoming data the prev. 5 min.


Now, below is MRTG-config reading the cyberdo-node at port 15717, syberdo_slave4 at port 15720, and one reading from the machine itself. My readings can be seen at: http://www.acc.umu.se/~cyberdo/snmp/mrtg/_index.htm

To make it work, I use a little script placed at /etc/mrtg/tools/memused.sh (change the references below if you change the location):
#!/bin/sh
if [ "$1" == "" ] ; then
	    echo "$0 <hostname[:port]> <community>" ;exit 1
fi
totalmem=`snmpget -v 1 -O vq -c "$2" "$1" memTotalReal.0`
freemem=`snmpget -v 1 -O vq -c "$2" "$1" memAvailReal.0`
expr $totalmem - $freemem
echo $totalmem


And finally, the snmp-conf:

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
EnableIPv6: no
Workdir: /var/www/mrtg/data
#PathAdd: /etc/mrtg/tools/
Options[_]: growright,unknaszero
Weekformat[^]: V
WithPeak[_]:wmy
PageTop[_]: <H1>Unnamed Graph</H1>
kilo[_]: 1024
MaxBytes[_]: 1000000000


YLegend[_]: Bps
ShortLegend[_]: bytes/s
LegendI[_]: output
LegendO[_]: input


# Accumulated datacount the past 5 min
Target[fred07_c]: .1.3.1.1.9.0&.1.3.1.1.9.1:storm@localhost:15717::::1
Options[fred07_c]: growright,absolute,unknaszero
PageTop[fred07_c]: <H1>Bandwidth usage for cyberdo (5 min. chunks)</H1>
Title[fred07_c]: Bandwidth usage for cyberdo (5 min. chunks)

# The proper counter
Target[fred07_clivebw]: .1.3.1.1.0.0&.1.3.1.1.0.1:storm@localhost:15717::::1
Options[fred07_clivebw]: growright
PageTop[fred07_clivebw]: <H1>Bandwidth usage for cyberdo (live)</H1>
Title[fred07_clivebw]: Bandwidth usage for cyberdo (live)

# Accumulated datacount the past 5 min
Target[fred07_s4]: .1.3.1.1.9.0&.1.3.1.1.9.1:storm@localhost:15720::::1
Options[fred07_s4]: growright,absolute,unknaszero
PageTop[fred07_s4]: <H1>Bandwidth usage for cyberdo_slave4 (5 min. chunks)</H1>
Title[fred07_s4]: Bandwidth usage for cyberdo_slave4 (5 min. chunks)

# The proper counter
Target[fred07_s4livebw2]: .1.3.1.1.0.0&.1.3.1.1.0.1:storm@localhost:15720::::1
Options[fred07_s4livebw2]: growright, unknaszero
PageTop[fred07_s4livebw2]: <H1>Bandwidth usage for cyberdo_slave4 (live)</H1>
Title[fred07_s4livebw2]: Bandwidth usage for cyberdo_slave4 (live)

YLegend[_]: B
ShortLegend[_]: B

# Free memory and Total memory
Target[fred07_c_mem]: memAvailReal.0&memTotalReal.0:storm@localhost:15717::::1
Options[fred07_c_mem]: growright,absolute,unknaszero
LegendI[fred07_c_mem]: Available memory
LegendO[fred07_c_mem]: Total memory
PageTop[fred07_c_mem]: <H1>Memory usage for cyberdo</H1>
Title[fred07_c_mem]: Memory usage for cyberdo

# Free memory and Total memory
Target[fred07_s4_mem]: memAvailReal.0&memTotalReal.0:storm@localhost:15720::::1
Options[fred07_s4_mem]: growright,gauge,unknaszero
LegendI[fred07_s4_mem]: Available memory
LegendO[fred07_s4_mem]: Total memory
PageTop[fred07_s4_mem]: <H1>Memory usage for cyberdo_slave4</H1>
Title[fred07_s4_mem]: Memory usage for cyberdo_slave4

# Used memory and Total memory for the local machine
Target[calzone_mem2]: `/etc/mrtg/tools/memused.sh localhost storm`
Options[calzone_mem2]: growright,gauge,unknaszero
LegendI[calzone_mem2]: Used memory
LegendO[calzone_mem2]: Total memory
PageTop[calzone_mem2]: <H1>Memory usage for calzone</H1>
Title[calzone_mem2]: Memory usage for calzone

# Amount of used memory vs. total.. instead of free vs. total
Target[fred07_s4_mem2use]: `/etc/mrtg/tools/memused.sh localhost:15720 storm`
Options[fred07_s4_mem2use]: growright,gauge,unknaszero
LegendI[fred07_s4_mem2use]: Used memory
LegendO[fred07_s4_mem2use]: Total memory
PageTop[fred07_s4_mem2use]: <H1>Memory used for cyberdo_slave4 2</H1>
Title[fred07_s4_mem2use]: Memory used for cyberdo_slave4_2
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki