Skip to main content

Hello,

I’m trying to use centreon plugin os::windows::snmp::plugin with list-services mode to get a list of all services on a host. Currently the command return a list of all running services only.

Is there a way to do this? Or is this the way that the OID return the info?

Thanks in advance,
Quentin

Tried to use ChatGPT to help me on this topic.

Here is the answer :

Yes, this may be normal depending on how the service information is collected by SNMP.

The snmpwalk command we used earlier queries the MIB (Management Information Base) associated with OID 1.3.6.1.4.1.77.1.2.3, which contains information about Windows services. However, the MIB only contains information for services that are currently running (i.e. "started" services). Therefore, if a service is stopped, it will not be included in the list returned by the snmpwalk command.

If you want to retrieve information about all Windows services, including those that are stopped, you can use other methods of gathering information, such as querying the Windows registry or using system commands such as sc query. However, this cannot be done directly with SNMP.

So if I understand correctly, this is a normal behavior. So I should use other methods if I want a list of stopped AND started services.


Hi @quentinrey, I've asked around and I can confirm the answer, Microsoft did not stick to their specs. Be careful, this time the answer is good but it's not always the right one :)  Cheers, 


Hi @quentinrey,

To monitor MS Windows, you should consider using WSMan.


Hi @quentinrey, I've asked around and I can confirm the answer, Microsoft did not stick to their specs. Be careful, this time the answer is good but it's not always the right one :)  Cheers, 

I guess you are talking about ChatGPT. I never take for granted his answers, I always do research to confirm (or deny) his answer :)

 

Hi @quentinrey,

To monitor MS Windows, you should consider using WSMan.

Thanks for your feedback I will look into it!


Reply