[mrtg] Re: can't get work 'gauge' option

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Dec 8 01:14:23 MET 2001

Alex Antropoff wrote:

> > The first line of your log file should show you the values you
> > collected with this script.  If they are not showing proper values
> > then something's wrong when trying to call this script.

> The data in log is correct, but it looks like option gauge is emitted :-/
> After first start of mrtg log is ok, but after next runs log looks like:
> 1007769601 0 0

So, MRTG thinks your script returned 0 and 0 as the values.

> During all time of test values from script were equal to 3.

Try debugging that.  Either you think your script should return
3 while it doesn't, or something strange is going on in the
interaction between your script and MRTG.

I found it useful from time to time when I stored the output of
such scripts in a log file (not *the mrtg* log file !).  Sometimes
"hidden" characters cause strange results, think of things like
"8^H3" or maybe "\n\n3\n3\nuptime\nsysname".

Just duplicate any output to a log, for instance something like:

   echo $in
   echo $out
   echo $uptime
   echo systemname
 [debug version]
   TIMESTAMP=`/bin/date +%Y%m%d%H%M%S`
   echo $in > /tmp/script.out.$TIMESTAMP
   echo $out >> /tmp/script.out.$TIMESTAMP
   echo $uptime >> /tmp/script.out.$TIMESTAMP
   echo systemname >> /tmp/script.out.$TIMESTAMP
   echo $in
   echo $out
   echo $uptime
   echo systemname

 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
| Technical questions sent directly to me will be nuked. Use the list. | 
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list