I have a batch file that will start wireshark on a remote machine. I would like for nagios to execute said batch file when the bandwidth on a port is exceeded.
Thank for any help.
I would like to run a batch file when a threshold is exceede
-
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
Just to get you started before someone offers more help, you'll be using eventhandlers to do this.
How you'll do it will depend on the remote machine OS and what method you currently use to monitor, NRPE, NSCLient, etc...
How you'll do it will depend on the remote machine OS and what method you currently use to monitor, NRPE, NSCLient, etc...
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
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
the remote maching is not monitored, the bandwidth would be monitored on my brocade router.
when the router reaches 890Mbs i want to fire off the batch file which inturn start my wireshark capture.
when the router reaches 890Mbs i want to fire off the batch file which inturn start my wireshark capture.
Re: I would like to run a batch file when a threshold is exc
Well, I'm sure there are other ways to do it, but this is how I would:
Install NSClient++ on the remote machine and create a command that points to and executes that batch file.
In XI, create a command that uses nrpe to execute that command
On the BW monitoring service, set the event handler to that new command
I think that'll work
I'm sure nagios will step in and say I'm nuts if not, LOL.
Install NSClient++ on the remote machine and create a command that points to and executes that batch file.
In XI, create a command that uses nrpe to execute that command
On the BW monitoring service, set the event handler to that new command
I think that'll work
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: I would like to run a batch file when a threshold is exc
Just to add on to what Bandit said, there is no way for Nagios to execute things on a remote machine unless you install an agent that allows this.
Former Nagios employee
-
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
nsclient has been installed om remote machine.
A batch file has been created and put into a shared folder accesable by Nagios.
I have created a command that I think will execute the batch file on the remote machine.
I am now stuck on how to:
1. make the command visable under the event Handler pull down.
2. execute the command
A batch file has been created and put into a shared folder accesable by Nagios.
I have created a command that I think will execute the batch file on the remote machine.
I am now stuck on how to:
1. make the command visable under the event Handler pull down.
2. execute the command
Re: I would like to run a batch file when a threshold is exc
1.) Edit the command and set it to "Misc Command" instead of check
2.) It should kick off once the port floods. You can test from the command line of the nagios server using the check_nrpe command.
2.) It should kick off once the port floods. You can test from the command line of the nagios server using the check_nrpe command.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
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
okay, i see that the command is now available, question:
1. How will i know that it is running.
2. will it attempt to run it everytime
3. if so how do I get it to run only once?
Thanks
1. How will i know that it is running.
2. will it attempt to run it everytime
3. if so how do I get it to run only once?
Thanks
Re: I would like to run a batch file when a threshold is exc
1.) You wont really
2.) Depends on your coding of the batch file
3.) Here is some help http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
2.) Depends on your coding of the batch file
3.) Here is some help http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: I would like to run a batch file when a threshold is exc
benningtonr wrote:1. How will i know that it is running.
You may want to add a line to your script/batch file to write a line to a text file. This will let you know if it runs.BanditBBS wrote:1.) You wont really
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.