Re: [Nagios-devel] Services check and unreachable host status

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
Guest

Re: [Nagios-devel] Services check and unreachable host status

Post by Guest »



-----Message d'origine-----
De=A0: [email protected] =
[mailto:[email protected]] De la part de =
Andreas Ericsson
Envoy=E9=A0: jeudi 27 septembre 2007 14:07
=C0=A0: Nagios Developers List
Objet=A0: Re: [Nagios-devel] Services check and unreachable host status

Gabes Jean wrote:
>=20
>>=20
>> Is there a way to put service in state UNKNOWN (and do not make the
>> check) when the host is in an UNREACHABLE state?
>>=20
>=20
>>> No there isn't, and that would be lying, basically, since the
>>> services aren't actually working when the host serving them is
>>> down.
>=20
> Yes, but the contacts know that the server is down so the services
> are down too. When I know that the server is down, I don't care about
> services for the moment. I don't think I've got service that can be
> up when host is unreachable. I think I'll make the change and test
> it. This can help me to see only few errors, but real errors (so when
> the service is down, it's not about unreachability, but the service
> is really down).
>=20

>>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.

Yes, but I prefer modify some C lines than PHP :)
I just want to test the behaviour, and the easy way is to modify the =
source I think. If it's successful, I'll (try to) patch the web =
interface :)=20

>=20
>> I can try to patch, the main service function seem to be the=20
>> run_service_check (base/check.c), isn't it?
>>=20
>=20
>>> You will need to add your patch after the state-change detection
>>> logic has been applied in reap_service_checks(), which will force
>>> the host check to run only if a service changes state.
>=20
> Yes, I think about patch the :=20
> temp_service->last_hard_state=3Dtemp_service->current_state; into:=20
> temp_service->last_hard_state=3DSTATE_UNKNOWN;
>=20
> in the function reap_service_checks, line 1183 (Nagios 2.5)
>=20

>>I still think the presentation layer would be a better place to alter
>>this, but hey, it's opensource, so go wild and good luck ;-)

Yes, it's true. Thanks.



Jean

--=20
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

-------------------------------------------------------------------------=

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/lis ... gios-devel





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked