MySQL Mapping - NDO
Hugo Hallqvist
hugo at op5.se
Fri Mar 24 14:26:24 CET 2006
On Tue, Feb 21, 2006 at 06:38:11PM -0300, Alessandro Ren wrote:
>
> There is the field "address" on the table ndo_hosts, this is the IP
> address of the host.
> In the table ndo_hoststatus you have the field current_state, that
> ranges from 0 to 2, 0 is UP, 1 is DOWN and 2 is UNREACHABLE.
> For services, from 0 to 3, as defined int eh nagios.h
>
> #define STATE_OK 0
> #define STATE_WARNING 1
> #define STATE_CRITICAL 2
> #define STATE_UNKNOWN 3 /* changed from -1 on 02/24/2001 */
>
> []s.
Hello,
regarding the current_state field of the status tables I wonder what the
correct way to detect if a service (or host) check is pending would be? Should
I consider a non existant row in servicestatus table as a service which has
not yet been checked?
This would unfortunately make it hard to separate a missing row in the
servicestatus table from a row which is filtered out by some other condition.
Sometimes, there exist rows in servicestatus table which has
UNIX_TIMESTAMP(last_check) == 0 and output == "(Service assumed to be ok)",
when do these rows get inserted? Would this be a valid way of finding out if
the check is pending?
//Hugo
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
More information about the Developers
mailing list