[mrtg] external skripts in mrtg

Holger Sellenthin hsellen at tourisline.com
Wed May 16 09:10:45 MEST 2001


i've read that it's possible to integrate external skripts in mrtg.
that's why i was trying to monitor the swap allocated and used on one of our
with the help of mrtg-reference i wrote my mrtg.cfg in the following way:

HtmlDir: /var/bb/bb16d/www/html/mrtg-html
ImageDir: /var/bb/bb16d/www/html/mrtg-pics
LogDir:  /var/bb/bb16d/www/html/mrtg-log
Language: german
Options[_]: growright
kilo[_]: 1024

# swap
Target[]: `swap -s | awk '{print $2; print $9; print "some
time"; print "warnow"}' | sed -e 's/k//'`
Title[]: warnow - swap
PageTop[]: warnow - Größe des Swap-Bereiches
MaxBytes[]: 630912
Options[]: absolute, growright
LegendI[]:   allocated:
LegendO[]:   used:
YLegend[]: kB
ShortLegend[]: B
Suppress[]: ym
Legend1[]: swap allocated
Legend2[]: swap used

but now the cronjob is creating an error-message:

Your "cron" job on warnow

produced the following output:

sh: swap: not found
WARNING: Could not get any data from external command 'swap -s | awk '{print
$2; print $9; print "some time"; print "warnow"}' | sed -e 's/k//''
Maybe the external command did not even start. (Bad file number)

what i am doing wrong?
i've got the same message when calling a script in the target-line.

Holger Sellenthin
System Administrator

tourisline AG
Zur Schwedenschanze 2
18435 Stralsund/Germany

fon +49 (0) 38 31 - 36 76 729
fax +49 (0) 38 31 - 36 76 580
mailto: hsellen at tourisline.com

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