(Service Check Timed Out) returns critical

Marc Powell marc at ena.com
Mon Aug 17 17:44:42 CEST 2009


On Aug 17, 2009, at 10:02 AM, Marco Tirado wrote:

> Hello Users:
>
>  I believe this question has popped out before in the forum but I  
> still have not seen any direct answer. I have some problems with a  
> couple of checks that return (Service Check Timed Out) with a  
> critical state. I would ike to know if it is possible to configure  
> these timeouts to returns status unknown instead.


It's not configurable but you can edit the source and recompile. There  
might be a better way to do this but I would --

In base/utils.c, look for  --

/* handle timeouts when executing service checks */
/* 07/16/08 EG also called when parent process gets a TERM signal */
void service_check_sighandler(int sig){
         struct timeval end_time;

         /* get the current time */
         gettimeofday(&end_time,NULL);

#ifdef SERVICE_CHECK_TIMEOUTS_RETURN_UNKNOWN
         check_result_info.return_code=STATE_UNKNOWN;
#else
         check_result_info.return_code=STATE_CRITICAL;
#endif


and add the single line --

#define SERVICE_CHECK_TIMEOUTS_RETURN_UNKNOWN

/* handle timeouts when executing service checks */
/* 07/16/08 EG also called when parent process gets a TERM signal */
void service_check_sighandler(int sig){
         struct timeval end_time;

...

--
Marc


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list