[mrtg] external skripts in mrtg

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


hi,

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




but now the cronjob is creating an error-message:


Your "cron" job on warnow
/var/bb/bb16d/MRTG/mrtg-2/bin/mrtg.sh

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