monitoring a service with a parameter

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
gatorcb
Posts: 3
Joined: Tue May 07, 2013 11:52 am

monitoring a service with a parameter

Post by gatorcb »

We have the need to monitor an ldpservice the windows path and parameter are C:\Windows\System32\svchost.exe -k LPDService How do you go about setting nagios to watch the health of the service since lots of other things using svchost, so checking the exe is not an option?

Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: monitoring a service with a parameter

Post by slansing »

You should be able to find the active directory service under services in "services.msc" rather than trying to monitor it under the svchost process you can cut directly to the service.
gatorcb
Posts: 3
Joined: Tue May 07, 2013 11:52 am

Re: monitoring a service with a parameter

Post by gatorcb »

The display name is LPD Service in services. Are you saying you can check the name and the running state? If so, how? Forgive me I'm not the nagios admin
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: monitoring a service with a parameter

Post by sreinhardt »

You most certainly can! How would depend on what you are using to check the windows client. Are you using a remote client, wmi or snmp? In most cases you would actually want the service name from the service properties not the display name.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
gatorcb
Posts: 3
Joined: Tue May 07, 2013 11:52 am

Re: monitoring a service with a parameter

Post by gatorcb »

We are using snmp. The service name is LPDSVC. Any more specific information on how to monitor would be greatly appreciated
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: monitoring a service with a parameter

Post by sreinhardt »

According to some testing and many articles online. A Windows service can ONLY be seen via snmp if the service is presently running. With that being said you can walk the tree from svSvcName found in the mib C:\Windows\System32\lmmib2.mib. If the name is found, it is running, if not it is either disabled or not running presently. If it is running, there is additional data that you can query but as with before you cannot see if it is disabled or anything else if it is not running. I would highly suggest using WMI opposed to snmp for agentless checks against windows.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked