[mrtg] Re: Using ThreshProg under Windows

Sverre Munthe sm at lorstem.no
Thu Dec 4 18:09:50 MET 2003


I found it.

If you don't change directory to the directory containing the batch file
(ie. cd \scripts) it won't execute. I'm sure someone has an explanation
for that, but I'm not able to think of one right now. :)


-----Original Message-----
From: Kerry Werry [mailto:KWerry at pivotal.com] 
Sent: 4. desember 2003 17:57
To: Sverre Munthe
Subject: RE: [mrtg] Using ThreshProg under Windows

I use thresholds and my understanding was that yes you had to do
something with the parameters passed by mrtg... Ok maybe if all you want
is an e-mail with no info you don't...

Here is my .bat file (I use mapisend not wsendmail)

cd \scripts
t1bwthreshdata.pl %1 %2 %3
mapisend.exe -r "xxx at ayx.com" -u "xxx" -p aaaaaa -s "MRTG BANDWIDTH
(Inbound) Under Threshold" -t c:\scripts\error1.txt

Kerry L. Werry
604-699-8087 (office)
604-762-1293 (cell)

-----Original Message-----
From: Sverre Munthe [mailto:sm at lorstem.no]
Sent: Thursday, December 04, 2003 8:52 AM
To: Kerry Werry
Cc: mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Using ThreshProg under Windows

I don't call a perl script, I call a batch file (I'm using Windows). And
you don't necessarily have to do anything with the parameters passed
from MRTG as I undertsand it?

The problem here seems to be that I'm not able to execute the contents
of the batch file because f the way the batch file itself is run when
called from an external program (like MRTG).

If ANYONE at all has ANY ideas it would be VERY welcomed. I'm completely
stuck on this one.

-----Original Message-----
From: Kerry Werry [mailto:KWerry at pivotal.com]
Sent: 4. desember 2003 17:47
To: Sverre Munthe
Subject: RE: [mrtg] Using ThreshProg under Windows

Where are you calling the perl script??? Threshold passed 3 variables
you have to do something with them usually in a perl script....

KLW

Kerry L. Werry
604-699-8087 (office)
604-762-1293 (cell)

-----Original Message-----
From: Sverre Munthe [mailto:sm at lorstem.no]
Sent: Thursday, December 04, 2003 6:35 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Using ThreshProg under Windows

Trying to use the ThreshProg line in my Windows environment and it
doesn't seem to work. I'm guessing it's because of the way Windows
operates, so wondering if anyone know how the command has to be to work.

Here is how I do it today:

ThreshMinI[LORFILE-temperature]: 10
ThreshMaxI[LORFILE-temperature]: 25
ThreshProgI[LORFILE-temperature]: ..\batch\lorfile-tempi.bat
ThreshProgOKI[LORFILE-temperature]: ..\batch\lorfile-tempi-ok.bat
ThreshMinO[LORFILE-temperature]: 10
ThreshMaxO[LORFILE-temperature]: 50
ThreshProgO[LORFILE-temperature]: ..\batch\lorfile-tempo.bat
ThreshProgOKO[LORFILE-temperature]: ..\batch\lorfile-tempo-ok.bat

In the batch directory I have the bat-files which looks like this:

c:\wsendmail\wsendmail -sLorFile-Temp -fXXX YYY < lorfile-tempi.txt

Have also tried this way:

cmd /C "c:\wsendmail\wsendmail -sLorFile-Temp -fXXX YYY <
lorfile-tempi.txt"

Can anyone help?


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