Page 1 of 1

monitoring a service with a parameter

Posted: Tue May 07, 2013 11:59 am
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

Re: monitoring a service with a parameter

Posted: Tue May 07, 2013 12:46 pm
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.

Re: monitoring a service with a parameter

Posted: Tue May 07, 2013 1:23 pm
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

Re: monitoring a service with a parameter

Posted: Tue May 07, 2013 1:44 pm
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.

Re: monitoring a service with a parameter

Posted: Wed May 08, 2013 9:05 am
by gatorcb
We are using snmp. The service name is LPDSVC. Any more specific information on how to monitor would be greatly appreciated

Re: monitoring a service with a parameter

Posted: Wed May 08, 2013 12:34 pm
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.