I am trying to write service to monitor Windows services using check_nrpe and check_service. I have a lot of services I've excluded, but I would like to also exclude "delayed" services that are stopped. I can't figure out the context to use and I can't find any documentation or examples.
I don't know the context on how to exclude "start_type". Below is what I have besides a laundry list of services I'm excluding. I just need to know how to exclude 'delayed'.
check_service "filter=start_type = 'auto'"
Check_Service exclude "delayed" services in Windows
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check_Service exclude "delayed" services in Windows
I this what you are looking for is something like this
"critical=state = not state_is_ok()"
From
https://docs.nsclient.org/reference/win ... ck_service
"critical=state = not state_is_ok()"
From
https://docs.nsclient.org/reference/win ... ck_service
Code: Select all
state_is_ok()
Check if the state is ok, i.e. all running services are running delayed services are allowed to be stopped)
Re: Check_Service exclude "delayed" services in Windows
Sorry for the late reply, but that did what I needed. I also set warning=none, because it was showing up as a warning if a delayed service was stopped.
Re: Check_Service exclude "delayed" services in Windows
I am glad your issue has been resolved! I will be locking this topic. If you have any more questions/issues, please start a new thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!