Checking Windows process with different users
Posted: Wed Jun 27, 2018 5:46 am
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.
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.