MRTG notes
MRTG:
from the website http://oss.oetiker.ch/mrtg/doc/mrtg.en.html: "The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic."
uses SNMP to gather data over the network - by default, it gathers bytes in/out for each interface. Question: can it easily be configured to gather other RMON data?
installation guide: (most dependencies are readily available in SL5/6): http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html
mrtg-2.17.1-1.el5.rfx.x86_64 available as RPM for CentOS/SL/RHEL 5/6. (Installed on onl14 for testing.) under /ldaphome/wbetts/mrtg, with device config file(s) under /ldaphome/wbetts/mrtg/cfg. (Presumably will move to a place with a web server, but for now, using local browser to access files.
key commands:
1. cfgmaker - produces configuration file for devices to be monitored. For instance:
2. mrtg - communicates with the switches and updates the RRDs and graphs. For instance:
3. indexmaker - produces an html index file to see the graphs generated by mrtg above:
from the website http://oss.oetiker.ch/mrtg/doc/mrtg.en.html: "The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic."
uses SNMP to gather data over the network - by default, it gathers bytes in/out for each interface. Question: can it easily be configured to gather other RMON data?
installation guide: (most dependencies are readily available in SL5/6): http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html
mrtg-2.17.1-1.el5.rfx.x86_64 available as RPM for CentOS/SL/RHEL 5/6. (Installed on onl14 for testing.) under /ldaphome/wbetts/mrtg, with device config file(s) under /ldaphome/wbetts/mrtg/cfg. (Presumably will move to a place with a web server, but for now, using local browser to access files.
key commands:
1. cfgmaker - produces configuration file for devices to be monitored. For instance:
/usr/bin/cfgmaker --global "WorkDir: /ldaphome/wbetts/mrtg" --global "Options[_]: bits, growright" --output /ldaphome/wbetts/mrtg/cfg/mrtg.SP.starp.realports.cfg --if-filter='$if_ref=~/^[0-3]?[0-9]$|^4[0-8]$/' <SNMPcommString>@splat-s60.starp.bnl.gov --if-filter='$if_ref=~/^[0-3]?[0-9]$|^4[0-8]$/' <SNMPcommString>@splat-s60-2.starp.bnl.govThis line creates a configuration file to access two switches (splat-s60 and splat-s60-2) and filters out the "unreal" ports greater than 48 that are found on the switches (not sure why (could it be because they are stackable?)). By default, "cfgmaker will not include interfaces which are marked anything but administratively and operationally UP", so not all ports will be monitored unless "--no-down" or "--show-op-down" is specified. (Note that the SNMP Community Name strings need to be substituted for "<SNMPcommString>". I have only tried SNMP v2 so far; not sure what else might be required for SNMP v3.)
2. mrtg - communicates with the switches and updates the RRDs and graphs. For instance:
env LANG=C /usr/bin/mrtg /ldaphome/wbetts/mrtg/cfg/mrtg.SP.starp.realports.cfgTypically this would be run every few minutes, such as in a cron job. The desired configuration file must be specified.
3. indexmaker - produces an html index file to see the graphs generated by mrtg above:
indexmaker --output index.html --title="SP-starp" cfg/mrtg.SP.starp.realports.cfgOnly if the configuration file changes should it be necessary to rerun indexmaker.
Groups:
- wbetts's blog
- Login or register to post comments