First time posting and hopes that someone can assist.    Been using 
Subscription version of Observium for over 10 years collecting data on over 150 
server farm using it daily and  have been asked to now add monitoring of 
Windows Services.  

I started to do this via Probes and SNMP checks but due to the shear volume of 
services and servers involved this would be a tedious process.   I would like 
to use WMI to monitor Windows Services as it appears to poll faster.   
Unfortunately I ran into an issue where it only displays 3 services at a time.  
 Windows Server has over 200 services by default, I don’t plan on monitoring 
all of them but at least a couple dozen.    Using WMI would be a much easier 
way to setup alerts if I could get the full listing to appear, which is where I 
am needing help.

Here is my setup to reproduce the issue (generalized information used for 
security)

Follow the WMI setup in the help documentation for my UB 22.04 server
Global Settings > Polling > WMI (turn on)
Server discovered via SNMP 
Open Properties of Server and edit WMI information  (per server polling only no 
global settings)
WMI Hostname = nacn_ip_TCP:hostname.domain.local[sign]
WMI Domain= domain
WMI Username = username
WMI Password = password

After a couple of minutes, I get the results of only showing 3 services not a 
full list.
AllJoyn Router Service
Remote Desktop Service
Themes

I have tried this on multiple servers and the same 3 services appear each time.

I began to look into the code and run the wmic query on the web server itself 
using the following query

wmic -U “domain\username%password” //ncacn_ip_TCP:hostname.domain.local[sign] 
“select DisplayName, Name, State, Status from Win32_Service”

It gave me the full listing results and from what I can see this is where the 
issue lies.

CLASS: Win32_Service
DisplayName|Name|State|Status
AllJoyn Router Service|AJRouter|Stopped|OK
Application Layer Gateway Service|ALG|Stopped|OK
Application Identity|AppIDSvc|Stopped|OK
…
Telephony|tapisrv|Stopped|OK
CLASS: Win32_TerminalService
DisplayName|Name|State|Status
Remote Desktop Services|TermService|Running|OK
CLASS: Win32_Service
DisplayName|Name|State|Status
Themes|Themes|Running|OK
Storage Tiers Management|TieringEngineService|Stopped|OK
…

The first item of the WMI services is the AllJoyn Router Service, then about 
halfway down the listing it produces a different CLASS:Win32_TerminalService 
and the headers.  Then it has Remote Desktop Services and starts again with 
CLASS:Win32_Service and headers again, and the third entry to be displayed 
Themes.

Looking through the code I think the issue resides in the  
/opt/observium/includes/wmi.inc.php  code and the function wmi_parse.   This is 
the function that is used (from what I can back trace) for performing the 
parsing of the WMI call and populating the database with the WMI entries.     
But when running the mysql query for the services listing it only shows these 3 
listed and not all the services that the manual query performed on the server 
displays.

I would like to ask if  someone can look into the WMI process and check the 
coding to allow the WMIC query to populate ALL the service results in the web 
site.

As a separate test I also went into the Global Settings > Discovery > WMI 
AutoDiscoveryOptions and added in several services manually (list of 10) not 
including the Remote Desktop Services and the results I get on the Windows 
Services tab show the Remote Desktop Services.   So the 2nd CLASS that appears 
for this service appears to be causing the issue.

 Any help is appreacited.
_______________________________________________
observium mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to