reported service state id when pending
Posted: Fri Jul 04, 2014 2:59 am
Hi,
I have a bunch of services that are only passively checked, and a few active services to monitor the passive ones.
Initially, all services are in a pending state (as they should be).
Now, when the few active services' checks run, I pass along the state id for the passive checks that should be monitored, using a bunch of $SERVICESTATEID:some.host:passive-service-desc$ macros.
The interesting fact here is, that all passive services in a pending state, are reported as... OK (!)
I know there is no state id representing pending, but perhaps state id 3 (Unknown) would be a better choice in this case.
This is easily verified when looking at the status.dat file, where I find `current_state=0` for services with `has_been_checked=0`. I don't see any macro for getting this information, though :/ (wether a service is in a pending state or not).
I'm a developer, so I'm not unfamiliar with the thought of diving in and fixing this myself, but would like to know if I'm missing something etc, as I'm rather new to nagios.
Perhaps it would make sense to introduce a new state id (say, 4), that represent this pending state. It should not be accepted as a result from running a command, only in cases where the current state is to be determined.
Any thoughts?
I have a bunch of services that are only passively checked, and a few active services to monitor the passive ones.
Initially, all services are in a pending state (as they should be).
Now, when the few active services' checks run, I pass along the state id for the passive checks that should be monitored, using a bunch of $SERVICESTATEID:some.host:passive-service-desc$ macros.
The interesting fact here is, that all passive services in a pending state, are reported as... OK (!)
I know there is no state id representing pending, but perhaps state id 3 (Unknown) would be a better choice in this case.
This is easily verified when looking at the status.dat file, where I find `current_state=0` for services with `has_been_checked=0`. I don't see any macro for getting this information, though :/ (wether a service is in a pending state or not).
I'm a developer, so I'm not unfamiliar with the thought of diving in and fixing this myself, but would like to know if I'm missing something etc, as I'm rather new to nagios.
Perhaps it would make sense to introduce a new state id (say, 4), that represent this pending state. It should not be accepted as a result from running a command, only in cases where the current state is to be determined.
Any thoughts?