[mrtg] Re: Help/Ext. Script : Could not get any data from externa l command

McDonald, Dan Dan.McDonald at austinenergy.com
Tue Jul 29 12:04:38 MEST 2003


>-----Original Message-----
>From: Leo Houer [mailto:solibra at berlin.com]
>
>When i want to use mrtg.cfg with a external script i get the following
errormessage on run of mrtg:
>
>---
>WARNING: Running '/etc/mrtg/ping.sh': Permission denied

Looks like the mrtg user doesn't have execute permission on that script.

>WARNING: Could not get any data from external command '/etc/mrtg/ping.sh'
>Maybe the external command did not even start. (Permission denied)
>---
>
>But when running this script from commandline with >sh ping.sh
>i dont get any error but some good output.

>Here the scripts itself:
>---
>#!/bin/sh
>
># Thierry Nkaoua tnka at linux-sottises.net
>
>P=`ping -c3 -w6 193.174.120.22|grep round`
>MIN=`echo $P|cut -d" " -f4|cut -d"." -f1`
>MAX=`echo $P|cut -d"/" -f5|cut -d"." -f1`
>echo $MAX
>echo $MIN
>---

It should return 4 lines, not two.  Add two echos at the end with zeros in
them.  The other two lines are ignored for content, but they have to be
present.
--
Dan McDonald, CCIE 2495
Austin Energy

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