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 .126.96.36.199.4.1.2021.255 /usr/local/libexec/tcqdiscdata.py --snmp
For a full dump of data collected, run with "--debug" for something like this:
.188.8.131.52.4.1.2021.255.3 ('string', 'qdisc') .184.108.40.206.4.1.2021.255.3.1 ('integer', 129) .220.127.116.11.4.1.2021.255.3.1.1 ('string', 'sfq') .18.104.22.168.4.1.2021.255.3.1.2 ('counter', 1768318) .22.214.171.124.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 email@example.com or firstname.lastname@example.org. This site powered by djbdns