<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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.<br>
<br>
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.<br>
<br>
Steve<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><strong>Steve Shipway</strong></div>
<div style="font-family:Tahoma; font-size:13px">University of Auckland ITS</div>
<div style="font-family:Tahoma; font-size:13px"><em>UNIX Systems Design Lead</em></div>
<div style="font-family:Tahoma; font-size:13px"><a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a></div>
<div style="font-family:Tahoma; font-size:13px">Ph: +64 9 373 7599 ext 86487</div>
<div style="font-family:Tahoma; font-size:13px"><em></em> </div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF722549"><font color="#000000" face="Tahoma" size="2"><b>From:</b> mrtg [mrtg-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] on behalf of Israel Brewster [israel@ravnalaska.net]<br>
<b>Sent:</b> Thursday, 29 January 2015 7:44 a.m.<br>
<b>To:</b> mrtg@lists.oetiker.ch<br>
<b>Subject:</b> [mrtg] Odd values from external script graph<br>
</font><br>
</div>
<div></div>
<div>
<div style="word-wrap:break-word">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.
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Thanks!
<div><br>
</div>
<div>WorkDir: /var/www/mrtg<br>
LogFormat: rrdtool<br>
PathAdd: /usr/local/bin<br>
Interval: 1<br>
<br>
Target[fai-dbs1-flightlog-queries]: `/usr/local/bin/pg_stats.py <required arguments>`<br>
Title[fai-dbs1-flightlog-queries]:fai-dbs1 FlightLogs Queries<br>
PageTop[fai-dbs1-flightlog-queries]: <h1>fai-dbs1 FlightLogs Queries</h1><br>
Options[fai-dbs1-flightlog-queries]: integer growright gauge noi<br>
MaxBytes[fai-dbs1-flightlog-queries]: 5000<br>
LegendI[fai-dbs1-flightlog-queries]: <br>
LegendO[fai-dbs1-flightlog-queries]: Count:<br>
Legend1[fai-dbs1-flightlog-queries]: <br>
Legend2[fai-dbs1-flightlog-queries]:Number of queries<br>
YLegend[fai-dbs1-flightlog-queries]:count<br>
<div>
<div style="text-indent:0px; orphans:2; widows:2; word-wrap:break-word">
<div>
<div style="orphans:auto; widows:auto; margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">-----------------------------------------------</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">Israel Brewster</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">Systems Analyst II</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">Ravn Alaska</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">5245 Airport Industrial Rd</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">Fairbanks, AK 99709</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">(907) 450-7293</span></div>
</div>
<div style="color:rgb(0,0,0); font-family:Helvetica,sans-serif; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; font-size:12px">
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif">-----------------------------------------------</span></div>
<div style="margin:0in 0in 0.0001pt; font-size:12pt; font-family:'Times New Roman',serif">
<span style="font-size:9pt; font-family:Helvetica,sans-serif"></span><br class="x_Apple-interchange-newline">
</div>
</div>
</div>
<span style="color:rgb(0,0,0); font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px"><br class="x_Apple-interchange-newline">
<span></span></span></div>
</div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div>
<div><span style="color:rgb(0,0,0); font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px"><span></span></span></div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>