[mrtg] Re: Threshold script won't run

Chris Snider Chris.Snider at Tagtmi.com
Wed Jan 14 22:49:02 MET 2004


Adam,
What entry do you have before the <TABLE> information?  You should have
something like  

ThreshProgI[clay3_26_err]: /export/home/testpage.p
PageFoot[clay3_26_err]:
 <TABLE>
         <TR><TD>System:</TD><TD>Clay3 in Clayponds, Topfloor
House</TD></TR>
         <TR><TD>Maintainer:</TD><TD></TD></TR>
         <TR><TD>Description:</TD><TD>A   </TD></TR>
        <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
        <TR><TD>ifName:</TD>     <TD>A </TD></TR>
         <TR><TD>Max Speed:</TD><TD>100.0 Mbits/s</TD></TR>
 </TABLE>

If you have just the <TABLE> information right after the ThreshProgI then
mrtg thinks it needs to execute the program  /export/home/testpage.p <TABLE>
<TR><TD>System:</TD>     <TD>Clay3 in Clayponds, Topfloor House 3</TD></TR>
<TR><TD>Maintainer:</TD>
<TD></TD></TR> <TR><TD>Description:</TD><TD>A   </TD></TR>
<TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD>     <TD>A </TD></TR> <TR><TD>Max Speed:</TD> 
<TD>100.0 Mbits/s</TD></TR> </TABLE>

Which of course is going to fail.

Try adding the PageFoot command before the Table and let me know if that
fixes it.

Thanks,
-----------------------------------------------
TAG/TMI 
Chris Snider
Systems Engineer
(402)479-0115 ext 13349
chris.snider at tagtmi.com
-----------------------------------------------


-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch] On
Behalf Of ghira at mistral.co.uk
Sent: Wednesday, January 14, 2004 10:29 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Threshold script won't run

I've looked up web pages about threshold scripts, and as far as I
can see I'm doing everything right. But it's not working, so there
must be something I'm missing...

I'm running MRTG 2.9.17 on a Solaris 8 machine. (I may upgrade
to a later version at some point).

Here's part of the config I'm trying to use:

Target[clay3_26_err]: `/export/home/httpd/mrtg/error.p`
#SetEnv[clay3_26_err]: MRTG_INT_IP="" MRTG_INT_DESCR="A "
MaxBytes[clay3_26_err]: 1
Title[clay3_26_err]: Error Analysis for 26 -- Clay3
PageTop[clay3_26_err]: <H1>Error Analysis for 26 -- Clay3</H1>
YLegend[clay3_26_err]: Errs per Mpkt
ThreshMaxI[clay3_26_err]: 1
#ThreshProgI[clay3_26_err]: /export/home/testpage.p

"testpage.p" is a perl script, and is executable. 

If I uncomment the ThreshProgI line, I get this:

usr/local/mrtg-2/bin/mrtg /export/home/httpd/mrtg/clay3demo.cfg 
ERROR: CFG Error in "threshprogi[clay3_26_err]", line 0: Threshold program
/export/home/testpage.p <TABLE> <TR><TD>System:</TD>     <TD>Clay3 in
Clayponds, Topfloor House 3</TD></TR> <TR><TD>Maintainer:</TD>
<TD></TD></TR> <TR><TD>Description:</TD><TD>A   </TD></TR>
<TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD>     <TD>A </TD></TR> <TR><TD>Max Speed:</TD> 
<TD>100.0 Mbits/s</TD></TR> </TABLE> cannot be executed

The "table" stuff comes from lines immediately following the
threshprog line.

This also happened with a previous shell script version called testpage

Web pages I've looked at say that the name of the threshprog doesn't
need to be in quotes or backticks. What am I doing wrong?

-- 
Adam Atkinson
ghira at mistral.co.uk

---------------------------------------------
This message was sent using Mistral Webmail.
http://www.mistral.net


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

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