Checking Windows process with different users

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
uKrease
Posts: 1
Joined: Thu Jun 18, 2015 4:37 am

Checking Windows process with different users

Post by uKrease »

Greetings Community,

I am currently trying to figure this one out, multiple searches have led me nowhere.

I currently use the following command from my Nagios server to check if a service is running on a Windows server :

[root@nagiosbox]# /usr/lib/nagios/plugins/check_nt -H 11.22.33.44 -p 12489 -d SHOWALL -v PROCSTATE -l ServiceName.exe -s mypassword
ServiceName.exe: Running, ServiceName.exe: Running

In this case it is returning that two processes are running, because there are two processes running with the same name on the server.

My problem is that the two processes, of the same name, are started by different users on the system.
The processes themselves reside in different folders on the server as well, so :
C:\Windows\User1\ServiceName.exe and
C:\Windows\User2\ServiceName.exe

I am trying to figure out a way for Nagios to tell me if one of the services fails, and if it does, which one fails....was it the one started by User1, or the one started by User2?

I will continue to Google for a solution, but I have been at this for nearly a day and it`s beginning to upset me a bit.

Nagios server is running Nagios Core 3.4.1 (Can`t upgrade to newer versions just yet)
Windows Client is Running latest NSclient++

Thank you for taking the time to assist, it is greatly appreciated.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Checking Windows process with different users

Post by scottwilkerson »

I currently do not know of a plugin that can do this, and am pretty sure the default check in nsclient cannot
http://docs.nsclient.org/reference/wind ... kprocstate

The only thing I can think of wold be you would have to write a powershell plugin that can make this determination and then call that via NRPE through NSClient
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked