Cannot get initial_state to work for active checks
Posted: Wed May 08, 2013 9:19 pm
Hi,
My eventual goal is to have an email sent out to all admins whenever nagios is restarted. Yes, they asked for this.
There are some complicated ways of doing this with custom plugin scripts but I was looking for an easy way.
I am using Nagios Core 3.2.1+squeeze1 on Debian 6.0. This is the debian-stable-blessed version of nagios for Debian 6.0.
My attempt has been either an active (not passive) host or service check that uses /bin/true as its command and has initial_state d (if host) or initial_state w (if service) set, with notification_options as d,r or w,r.
It never works. It appears as if nagios completely ignores initial_state. The cgi shows "pending", then OK. I cannot find a way to force the initial state to anything except PENDING.
I have search this forum and the web and I see references to a similar problem with passive checks, but I am using active checks.
I have tried changing retain_status_information and retain_nonstatus_information but these variables dont help. I have many other host and service checks that work fine, but dont rely on initial_state.
Has anybody else seen this? Any ideas? Is upgrading nagios (or using a more complicated check) my only remaining options?
My eventual goal is to have an email sent out to all admins whenever nagios is restarted. Yes, they asked for this.
There are some complicated ways of doing this with custom plugin scripts but I was looking for an easy way.
I am using Nagios Core 3.2.1+squeeze1 on Debian 6.0. This is the debian-stable-blessed version of nagios for Debian 6.0.
My attempt has been either an active (not passive) host or service check that uses /bin/true as its command and has initial_state d (if host) or initial_state w (if service) set, with notification_options as d,r or w,r.
It never works. It appears as if nagios completely ignores initial_state. The cgi shows "pending", then OK. I cannot find a way to force the initial state to anything except PENDING.
I have search this forum and the web and I see references to a similar problem with passive checks, but I am using active checks.
I have tried changing retain_status_information and retain_nonstatus_information but these variables dont help. I have many other host and service checks that work fine, but dont rely on initial_state.
Has anybody else seen this? Any ideas? Is upgrading nagios (or using a more complicated check) my only remaining options?