Need to monitor windows batch file is running or not

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tchandra
Posts: 38
Joined: Fri Oct 18, 2019 5:53 am

Need to monitor windows batch file is running or not

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Need to monitor windows batch file is running or not

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
tchandra
Posts: 38
Joined: Fri Oct 18, 2019 5:53 am

Re: Need to monitor windows batch file is running or not

Post by tchandra »

Hi benjaminsmith ,

Yes, we have installed NSClient on the system and monitoring the basic services of the server.


Regards,
Chandra
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Need to monitor windows batch file is running or not

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
tchandra
Posts: 38
Joined: Fri Oct 18, 2019 5:53 am

Re: Need to monitor windows batch file is running or not

Post 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
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Need to monitor windows batch file is running or not

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked