[mrtg] mrtg errors out when run as plain user

Mick michaelkintzios at gmail.com
Sat Sep 6 02:04:55 CEST 2008


Hi All,

I seem to be struggling setting up mrtg to read a text file with values I have 
parsed from an html page.  Typical values that I capture in 
file /tmp/modem.out are:
===================
7520
7328


6.0
4.0


===================

This is the mrtg.cfg:
===================
#################################
#       GLOBAL                  #
#################################

WorkDir: /home/michael/http/htdocs/mrtg

#################################
#  2WIRE 1800HG Router          #
#################################
WriteExpires: Yes
#RunAsDaemon: Yes
#Interval:    5
Title[^]:  Traffic Analysis for
Title[modem]: 2WIRE 1800HG BRIDGED MODEM
PageTop[modem]:2WIRE 1800HG
Target[modem]: `cat /tmp/modem.out`
MaxBytes[modem]: 100000
===================

I am certain that the the above file will not do what I want, which is to 
display the top two values shown in /tmp/modem.out on one graph in kbps and 
the bottom two values in another graph in dB.

This is the error I keep getting if I run mrtg as a plain user:
===================
$ /usr/bin/mrtg /home/michael/mrtg/mrtg.cfg --logging /var/log/mrtg.log
2008-09-06 00:57:29 -- Started mrtg with config '/home/michael/mrtg/mrtg.cfg'
2008-09-06 00:57:29, Rateup WARNING: /usr/bin/rateup could not read the 
primary log file for modem
2008-09-06 00:57:29, Rateup WARNING: /usr/bin/rateup The backup log file for 
modem was invalid as well
/usr/bin/rateup: Permission denied
2008-09-06 00:57:29, Rateup ERROR: Can't open modem.tmp for write
2008-09-06 00:57:29 -- 2008-09-06 00:57:29: ERROR: Skipping webupdates because 
rateup did not return anything sensible
2008-09-06 00:57:29 -- 2008-09-06 00:57:29: WARNING: rateup died from Signal 0
 with Exit Value 1 when doing router 'modem'
 Signal was 0, Returncode was 1
===================

No problem running it as root (although it does not show anything on the 
graphs).  Grateful for any pointers.
-- 
Regards,
Mick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20080906/1077f0cc/attachment.bin 


More information about the mrtg mailing list