I often want to display good time data on my quality of service rules and for years I've just created custom RRDTool data collection and graphing scripts to display this information. However, since I use Cacti as a host data summary system on my networks, I wanted a way to nicely communicate the statistics I wanted from arbitrary machines back to the Cacti server. While other options exist, I wanted to 'do it right' and created a script to generate proper SNMP formatted data to feed into Net-SNMP.
By collecting the data from the custom OIDs I'm using from within Cacti, I can graph my Quality of Service statistics like so:
Simply executing tcqdiscdata.py on the host machine will display nothing, using '--snmp' will generate appropriate output for the 'pass' option in net-snmp. The OID in use can be changed near the top of the script, as can the device name. For example:
pass .1.3.6.1.4.1.2021.255 /usr/local/libexec/tcqdiscdata.py --snmp
For a full dump of data collected, run with "--debug" for something like this:
.1.3.6.1.4.1.2021.255.3 ('string', 'qdisc') .1.3.6.1.4.1.2021.255.3.1 ('integer', 129) .1.3.6.1.4.1.2021.255.3.1.1 ('string', 'sfq') .1.3.6.1.4.1.2021.255.3.1.2 ('counter', 1768318) .1.3.6.1.4.1.2021.255.3.1.3 ('counter', 16681)
Page Copyright © 2014, Michael T. Babcock. All Rights Reserved.
To contact me, send an E-mail to sawyoursite
at this domain.
If you'd really like your mail server reported for spam, send me some junk mail to junk-yum@mikebabcock.me or devnull@mikebabcock.me. This site powered by djbdns