Re: Odd values from external script graph

Steve Shipway <[email protected]>
Newsgroups gmane.network.mrtg.user
Message-ID <5820DC553954E44FA1A36C78323AD14859ED106C@uxcn10-tdc06.UoA.auckland.ac.nz>
Probably you are getting Data Normalisation (so many times I've posted about this now!) which is trying to fit your data into the Interval.  Run your test updates exactly on the time boundary -- eg, at exactly 12:00 and 12:05, not at 12:01 -- to make the effect minimal.  You can also set the 'integer' option in MRTG so that it only displayes integers even if the values come out as fractional.

For the maxytes, If you are using Routers2 as a frontend, then you can use the extended 'nomax' option to hide the MaxBytes line, else set it to something huge and make sure you do not have the 'unscaled' option set.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
[email protected]<mailto:[email protected]>
Ph: +64 9 373 7599 ext 86487

________________________________
From: mrtg [[email protected]] on behalf of Israel Brewster [[email protected]]
Sent: Thursday, 29 January 2015 7:44 a.m.
To: [email protected]
Subject: [mrtg] Odd values from external script graph

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]:&nbsp;
LegendO[fai-dbs1-flightlog-queries]:&nbsp;Count:
Legend1[fai-dbs1-flightlog-queries]:&nbsp;
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
-----------------------------------------------

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.