The Green Shed

Graphing Data With SNMP and MRTG

March 09, 2016

Notes:

  • Had to install the extra MIBs with ``
  • Data is always in integer format. If you want decimals you have to use Factor
  • Watch your MaxBytes! If a value goes above that, MRGT will assume it was an error and either make it a 0 or not display it at all.
  • How to check an OID with SNMP: snmpget -v 2c localhost -c public .1.3.6.1.2.1.25.1.21
  • I put the entire flow of Updating MRTGs into a single script to avoid race conditions /usr/local/bin/update_values_and_run_mrtg
  • APCUPSD Getting Started: http://www.anites.com/2013/09/monitoring-ups.html
  • MRTG is writing to /www/mrgt on the Pi, but NGINX just points to that as the root.

Helpful Links:

  • David Taylor, the main link: http://www.satsignal.eu/raspberry-pi/monitoring.html#snmp
  • Some common OIDs: http://www.debianadmin.com/linux-snmp-oids-for-cpumemory-and-disk-statistics.html
  • Some helpful MRTG config examples: http://www.debianadmin.com/mrtg-installation-and-configuration-in-debian-based-distributions-2.html
  • This was helpful too: http://thejimmahknows.com/mrtg-in-minutes/?doing_wp_cron=1457481884.3515729904174804687500
  • MRTG Docs: https://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html