ConSol-Monitoring / snclient

SNClient+ - Cross platform monitoring agent
MIT License
48 stars 9 forks source link

Service check shows ok if Service is stopped or disabled - Windows services #72

Closed kafos closed 8 months ago

kafos commented 8 months ago

If I understand correctly, then I should get a warning/critical, if a service is disabled in windows. a filter like "service=SERVICENAME" should be enough. I get: image

how the query should look like with nrpe, if I want to get a warning if service is stopped? check_nrpe -H [IP] -c check_service -a 'service=CpdService' ... tried different variations but the query seems to be not korrekt

sni commented 8 months ago

i see, the issue here is the default warning/condition is "state != 'running' && start_type = 'auto'" which then fails to an issue if the start type does not match. This should be fixed with f62dd7bbe7bbb35d7e8cee613c1b921cbdf8c2c7. Default filters are now adjusted if service=... is used and only the state condition remains.