Services check and unreachable host status

Gabes Jean j.gabes at lectra.com
Thu Sep 27 12:48:35 CEST 2007



-----Message d'origine-----
De : nagios-devel-bounces at lists.sourceforge.net [mailto:nagios-devel-bounces at lists.sourceforge.net] De la part de Andreas Ericsson
Envoyé : jeudi 27 septembre 2007 11:54
À : Nagios Developers List
Objet : Re: [Nagios-devel] Services check and unreachable host status

Gabes Jean wrote:
> Hi list,
> 
> 
> I'm running Nagios 2.5 (not 3 because I use Oreon and It doesn't support
> it for the moment :( ). I've got a lot of distant host, so I use
> parent/child relation between servers and routers. So I don't receive
> notification if the host are in a unreachable state. All is good in the
> host level. The problem I've got is that the services of theses servers
> are checked. They do not send me alert (no u flag in the service
> notification definition), but the information of CRITICAL state is in
> the nagios.log. The web interface show me error in theses hosts because
> the error is present in the nagios.log.
> 
> Is there a way to put service in state UNKNOWN (and do not make the
> check) when the host is in an UNREACHABLE state?
> 

>>No there isn't, and that would be lying, basically, since the services
>>aren't actually working when the host serving them is down.

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


> 
> I can try to patch, the main service function seem to be the
> run_service_check (base/check.c), isn't it?
> 

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

Yes, I think about patch the :
temp_service->last_hard_state=temp_service->current_state;
into:
temp_service->last_hard_state=STATE_UNKNOWN;

in the function reap_service_checks, line 1183 (Nagios 2.5)


Thanks for the help,

I'll be back with test soon.


Jean


-- 
Andreas Ericsson                   andreas.ericsson at op5.se
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
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel

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




More information about the Developers mailing list