Page 1 of 1
Need to monitor windows batch file is running or not
Posted: Tue May 11, 2021 1:07 am
by tchandra
Hi Team,
Hope everyone doing great...
we are using Nagios Xi 5.7.3 and monitoring multiple servers (Windows & Unix ). We have one task that there is one batch file ( needs to run continuously) running in client server (windows server). we need to monitor that batch file and to get alert when it stops running.
Could someone please help to monitor the batch file and to get alert when it stops running.
Thanks in Advance.
Regards,
Chandra
Re: Need to monitor windows batch file is running or not
Posted: Tue May 11, 2021 2:16 pm
by benjaminsmith
HI Chandra,
Hope you are doing well. Do you have an agent installed on the system? If so, which one and I can provide recommendations for you.
Also, a good resource for example process checks is the following page on our knowledgebase. It has several example checks depending on which agent you might be using.
Process Checks
--Benjamin
Re: Need to monitor windows batch file is running or not
Posted: Wed May 12, 2021 3:52 am
by tchandra
Hi benjaminsmith ,
Yes, we have installed NSClient on the system and monitoring the basic services of the server.
Regards,
Chandra
Re: Need to monitor windows batch file is running or not
Posted: Wed May 12, 2021 2:41 pm
by benjaminsmith
Hi Chandra,
Perfect. Thanks for the clarification. So if you're using NSCLient, you can check a process with the following command:
Code: Select all
./check_nrpe -H <IP address> -c check_process -a process=chrome.exe
And here's the official doc on that filter:
https://docs.nsclient.org/reference/win ... ck_process
I would recommend testing this out from the command line in XI, and once you get it working, then create a new service for the check. Let me know if you need assistance with that part.
Regards,
Benjamin
Re: Need to monitor windows batch file is running or not
Posted: Mon May 24, 2021 5:10 am
by tchandra
Hi Benjamin ,
Sorry for late reply. Once again I am reminding you that we need to monitor whether batch file ( in windows server ) is running or not.
if the batch file gets stopped , nagios alert has to be triggered.
However, i have installed the check_process in Nagios Xi server and verified from command line , but no luck .
Attached is for your reference.
Could you please suggest on this
Regards,
Chandra
Re: Need to monitor windows batch file is running or not
Posted: Mon May 24, 2021 11:08 am
by benjaminsmith
Hi Chandra,
NSClient does not support new packet types that NREP uses, please add a
-2/icode] right after check_nrpe in the command string and let me know if the issue is resolved.
Also, if you get an error, please post the output to the thread as before. Thanks! Benjamin
References:
NRPE - v3 Compatibility With Previous Versions
NRPE 4.0.0 = CHECK_NRPE: Invalid packet version received from server on Windows