[mrtg] Re: script question..(quite long)..

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Wed Dec 8 01:22:56 MET 1999

Marc-Adrian Napoli wrote:
> Hi all,
> I have the following in machines.cfg in my /mrtg-2.5.2 directory:
> Target[hda2]: `/bin/df -k | /usr/bin/awk '/\/dev\/hda2/ {print $3 "\n"
> $3"\n0\n" $1}'`
> Title[hda2]: Disk usage for hda2 - mounted on /
> Options[hda2]: gauge
> MaxBytes[hda2]: 2919968
> PageTop[hda2]: <H1>Disk usage for hda2 - mounted on / </h1>

Inside the CHANGES file from a more recent mrtg:

1/ If there is a ' in an external target description (within `),
   mrtg dies with eval problems.  (I needed ' to protect spaces).
   This comes from a substitution in the target, which tries to convert
   the target in a perl string, quoted with '. Therefore a ' in the target
   causes a badly quoted string.

Perhaps upgrading will solve your problems?

 / 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 |

* 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