I would like to run a batch file when a threshold is exceede

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: I would like to run a batch file when a threshold is exc

Post by benningtonr »

this is my command to run with the event handler

$USR1$/run_Capture -H -u 60 192.168.99.150 -c capture\capture.bat

Doesn't seem to be working
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: I would like to run a batch file when a threshold is exc

Post by lmiltchev »

Is this a typo?
$USR1$/run_Capture -H -u 60 192.168.99.150 -c capture\capture.bat
Be sure to check out our Knowledgebase for helpful articles and solutions!
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: I would like to run a batch file when a threshold is exc

Post by benningtonr »

yes, sorry

$USER1$/run_Capture -H -u 60 192.168.99.150 -c capture\capture.bat
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: I would like to run a batch file when a threshold is exc

Post by slansing »

This might be of help as well, I wrote up a small guide on implementing an automated service restart on a windows/linux system when a check on that service returned that it was down. You could glean some information from that and sculpt it around your check / handler combo:

http://library.nagios.com/library/produ ... -nagios-xi
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: I would like to run a batch file when a threshold is exc

Post by benningtonr »

So, is this in a proper format to start the BAT file?

$USER1$/run_Capture -H -u 60 192.168.99.150 -c capture\capture.bat
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: I would like to run a batch file when a threshold is exc

Post by lmiltchev »

What is in run_Capture and capture.bat? Can you post the code?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked