Re: [Nagios-devel] Services check and unreachable host status
Posted: Thu Sep 27, 2007 5:11 am
-----Message d'origine-----
De=A0: [email protected]=20
=C0=A0: Nagios Developers List
Objet=A0: Re: [Nagios-devel] Services check and unreachable host status
>>> That's an option, ofcourse, but it sounds to me as if you really =
should
>>> be patching the GUI files to hide services that are on hosts that =
are
>>> down. That way you should get what you want while maintaining report
>>> correctness.
>=20
> Yes, but I prefer modify some C lines than PHP
>>The web-interface is written in C, so it'd be the same there.
I wrote the little hack in the code:
/base/check.c, line 1115:
/* Ugly hack for service in a UNKNOWN state for UNREACHABLE host */
if(temp_host->current_state=3D=3DHOST_UNREACHABLE){
temp_service->current_state =3D STATE_UNKNOWN;
temp_service->state_type =3D HARD_STATE;
}
That's all
If the service check is done before the host is declared down, it raises =
a critical error. I'll add a loop for checking the parents, like in the =
host check.
Then testing for usage and see how modify the interface
Jean
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]