Check_Service exclude "delayed" services in Windows

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
gkramps
Posts: 11
Joined: Tue Apr 17, 2018 9:47 am

Check_Service exclude "delayed" services in Windows

Post by gkramps »

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'"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_Service exclude "delayed" services in Windows

Post by scottwilkerson »

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

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)
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
gkramps
Posts: 11
Joined: Tue Apr 17, 2018 9:47 am

Re: Check_Service exclude "delayed" services in Windows

Post by gkramps »

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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Check_Service exclude "delayed" services in Windows

Post by lmiltchev »

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!
Locked