The target line must be write like this:
Target[script]: `/path/script.sh`
And the file need to be executable, try this permission -rwxr--r--
Last but not least the output result must be something like this:
$ sh script.sh
77
77
$
Two integers (input and output) values, and others two line:
the hostname and the uptime, theese two line could be blank lines, like in
my script.
Bye,
Ste.
----- Original Message -----
From: "Zeeshan Ahmed" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 05, 2005 9:32 AM
Subject: [mrtg] how to include a script in target line
> Dear all
>
>
> I am trying to include a script in the mrtg target line, this script
include
> an snmpwalk command, which gives out put in for of integer no.
>
> Target[examplescript]: `online`
>
>
>
> And I get following error when I run this mrtg cfg file
>
>
>
> ERROR: Target[examplescript][_IN_] ' $target->[0]{$mode} ' did not eval
into
> defined data
>
> ERROR: Target[examplescript][_OUT_] ' $target->[0]{$mode} ' did not eval
> into defined data
>
>
>
>
>
> Any help
>
>
>
> Regards
>
>
>
> Zeeshan Ahmed
>
> Assistant Manager Technical (Networks)
>
> ICT Department
>
> WorldCALL Multimedia Pvt Ltd
>
> 16-S Gulberg II
>
> Lahore, Pakistan
>
> Off: 92 (42) 5877051-55
>
> Cell: (92) 03008417426
>
>
>
>
>
> --
> Unsubscribe mailto:[EMAIL PROTECTED]
> Archive http://lists.ee.ethz.ch/mrtg
> FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
> WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
>
>
--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi