[mrtg] Odd values from external script graph

Israel Brewster israel at ravnalaska.net
Wed Jan 28 19:44:59 CET 2015


I'm sure I'm just missing a config directive somewhere, but I can't seem to figure out what. I have a MRTG graph I have set up to show query counts on my database. I reset the stats after each time I pull them, so I have the MRTG Options gauge directive specified. On a test database with no active users, I then ran twelve queries, and verified that the script I am running to get the data showed 12 as the output on the first line. However, when MRTG next ran, it showed a last value of only 4 rather than the 12 my script is returning. To make it even more odd, I've sometimes seen values of 1.6 or other non-integer numbers, even though my script only returns integer values. What am I missing? My config is shown below.

On a mostly unrelated note, is there any way to not have a MaxBytes directive? Since I am displaying a query count, it is essentially unlimited, although obviously I could just use some value that is so ridiculously high it is unlikely to ever be exceeded.

Thanks!

WorkDir: /var/www/mrtg
LogFormat: rrdtool
PathAdd: /usr/local/bin
Interval: 1

Target[fai-dbs1-flightlog-queries]: `/usr/local/bin/pg_stats.py <required arguments>`
Title[fai-dbs1-flightlog-queries]:fai-dbs1 FlightLogs Queries
PageTop[fai-dbs1-flightlog-queries]: <h1>fai-dbs1 FlightLogs Queries</h1>
Options[fai-dbs1-flightlog-queries]: integer growright gauge noi
MaxBytes[fai-dbs1-flightlog-queries]: 5000
LegendI[fai-dbs1-flightlog-queries]:    
LegendO[fai-dbs1-flightlog-queries]: Count:
Legend1[fai-dbs1-flightlog-queries]: 
Legend2[fai-dbs1-flightlog-queries]:Number of queries
YLegend[fai-dbs1-flightlog-queries]:count
-----------------------------------------------
Israel Brewster
Systems Analyst II
Ravn Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
-----------------------------------------------




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/mrtg/attachments/20150128/37b46fc6/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
URL: <http://lists.oetiker.ch/pipermail/mrtg/attachments/20150128/37b46fc6/attachment-0001.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/mrtg/attachments/20150128/37b46fc6/attachment-0003.html>


More information about the mrtg mailing list