Dears, I'm new in nagios. Please help me with creating check for monitoring a batch file. I mean running or no running a batch file in Windows machine, location D:\test.bat.
I need get information, in nagios monitoring system, when batch file is not running.
Great Thanks.
check for checking a running batch file.
Re: check for checking a running batch file.
http://assets.nagios.com/downloads/ncpa ... index.html
You could install NCPA and use it to run a script which checks for a process running.
You could install NCPA and use it to run a script which checks for a process running.
Former Nagios employee
Re: check for checking a running batch file.
Dear tmcdonald, we use nsclient++. Can you suggest check for nsclient++?tmcdonald wrote:http://assets.nagios.com/downloads/ncpa ... index.html
You could install NCPA and use it to run a script which checks for a process running.
Re: check for checking a running batch file.
You can use the PROCSTATE var to check a process for state:
Code: Select all
check_nt -H <windows ip> -p 12489 -s <password> -v PROCSTATE -l <process> -d SHOWALLFormer 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.
Re: check for checking a running batch file.
Dear abrist,
Thank you for code, but there are severeral BAT files, which use cmd.exe process. I need check test.bat not test1.bat, test2.bat.
Thank you for code, but there are severeral BAT files, which use cmd.exe process. I need check test.bat not test1.bat, test2.bat.
-
chris.fixter
- Posts: 22
- Joined: Wed Jun 18, 2014 4:15 am
Re: check for checking a running batch file.
We had similar problem with Java applications. Our solution was to copy the java.exe to different names, and each batch calls the different executable.
In your case, you can make multiple copy of c:\wdinwos\system32\cmd.exe to eg. cmd2.exe, cmd3.exe.
In your batch file you can execute : "cmd2.exe /c ....." encapsulate your real command. Then you will be able to use Abrist's nagios command.
In your case, you can make multiple copy of c:\wdinwos\system32\cmd.exe to eg. cmd2.exe, cmd3.exe.
In your batch file you can execute : "cmd2.exe /c ....." encapsulate your real command. Then you will be able to use Abrist's nagios command.
Re: check for checking a running batch file.
@kjafarov
Let us know if chris.fixter's post helped you solve the issue.
Let us know if chris.fixter's post helped you solve the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!