Just getting into the dude-game, and can’t find this in the wiki or on forums.
Is there any way to monitor service-status on windows servers?
I.e. I’d like to monitor the MS Exchange Information Store service. There’s an OID for the service when SNMP-walking the server, but with value = servicename. The value doesn’t change on stopping the service so seems it’s just seeing the fact that the service is installed, but no way of checking for running status.
Make a function call it find_notepad
Put this in the code field:
if(array_size(oid_column(“1.3.6.1.2.1.25.4.2.1.2”,10,29)), array_find(oid_column(“1.3.6.1.2.1.25.4.2.1.2”,10,29),“notepad++.exe”),“False”)
Make a probe call it notepad
type: function
agent: default
available: find_notepad()<>“False”
Error: if(find_notepad()<>“False”,if(find_notepad()<>-1, “”, “Warning: notepad not running”), “Failed to read running programs”)
This applies for the Exchange Transport service. For other services, no need changing the OID, just the service name to whatever it’s called.
I’ve experienced that heavy load servers might time out on service-calls, so the probing needs to be tuned to accept that you might get a few false errors before it starts spewing out mails and sms.