[mrtg] commas in an external command

ronan at kerna.ie ronan at kerna.ie
Mon Dec 6 18:33:51 MET 1999


Hi all.

I'm trying to get MRTG to monitor disk usage, system load, and number of
processes on a number of machines, and am using external programs to do so.

The config file is a relatively large one (34 entries), and is very
repetitive.

When I attempt to run MRTG, i get a long series of error messages, which are
all essentially similar.  There seems to be one for each entry.  Here is a
sample (they are all like this):

  gawk: /usr/users/ronan/mrtg/scripts/getload:12: fatal: cannot open file `/usr/users/alan/bb/www/logs/bogon' for reading (No such file or directory)
  Could not get any data from external command '/usr/users/ronan/mrtg/scripts/getload /usr/users/alan/bb/www/logs/bogon + kerna + ie.cpu'
  Maybe the external command did not even start. (Illegal seek)

And here is the entry in the config file which caused that particular error 
message:

  title[bogon.kerna.ie:load]: Load on bogon.kerna.ie
  pagetop[bogon.kerna.ie:load]: Load on bogon.kerna.ie
  target[bogon.kerna.ie:load]: `/usr/users/ronan/mrtg/scripts/getload /usr/users/alan/bb/www/logs/bogon,kerna,ie.cpu`
  maxbytes[bogon.kerna.ie:load]: 1000000
  options[bogon.kerna.ie:load]: gauge, growright, noinfo

`getload' is an awk script.  What it does is to look at a log file created
by another network monitoring program called Big Brother, and return the
info to MRTG.  (Incidentally, to get around the stipulation that each graph
must show 2 values, it simply returns 0 for the 2nd value).

>From looking at the other 33 error messages, it is quite obvious that what
MRTG is doing is changing each comma in the filename in each command to
<space plus-sign space>.  (I don't know why Big Brother chooses to name its
log files in this way).  Then, of course, gawk complains that it can't find
the filename which is its first argument.

The version of MRTG I have is the latest.

If I have diagnosed the problem correctly, I could kludge around it, but
maybe I am missing something?

Ronan

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list