Change timeout alerts from CRITICAL to WARNING

Nolan Martin Nolan.Martin at co.travis.tx.us
Wed Oct 2 16:26:19 CEST 2002


I am sure that the timeout is not due to Nagios, and instead is due to
latency in the lines between our primary campus and these remote sites. 
And I agree wholeheartedly that such timeouts point to underlying issues
that need to be addressed.  And that's one reason I turned to
applications like Nagios and MRTG - to help identify areas that need to
be improved - and to have the data to support these cases.

My original basis for wanting to display these timeouts as warnings
versus criticals, was that the timeouts did not truly indicate that
there was an issue with the host, and that I wanted to preserve the
significance of the critical alerts for events such as host down.  

But... having gone through this process, I've come to the same
conclusion - that it makes more sense to increase the timeout values for
these host devices

Anyway. Thanks to all for the feedback and responses.

Nolan

>>> Karl DeBisschop <karl at debisschop.net> 09/28/02 12:21AM >>>
On Fri, 2002-09-27 at 09:38, Nolan Martin wrote:
> Okay... Unfortunately, I am still not seeing the desired results... 
> Here are the steps I have done.  Perhaps someone can identify
something
> I have left out.  

Are you sure that he timeout is not being generated by nagios?

BTW - I really have to question the wisdom of what you seem to be
trying
to do here. ISTM that a timeout is rather bad thing, and should be
critical. Now you may have a network where 10 seconds is not enogh for
a
ping, but that really is a problem that you ought to fix. And to the
extent that you have to live with a ping still not coming back in 10
seconds, then I would think increasing the timeout is easier than
changing the code.

Is there some point I'm missing that motivates you to take this
approach?

> * In a separate directory (to isolate my test modifications), I
> downloaded and expanded the latest Nagios plugins.
> * Ran the configure: ./configure --prefix=/usr/local/nagios
> --with-nagios-user=nagios --with-nagios-group=nagios 
> --with-cgiurl=/nagios/cgi-bin 
> * Modified the check_ping.c file, lines 119 to 122 (see original
e-mail
> posting below).
> * Did a make all
> * Copied the compiled executable to libexec
> * Stopped and restarted Nagios, waiting for a timeout.  Timeout
still
> shows critical
> * Posted to group and received recommendation to change the utils.c
> * Went back to same directory
> * Modified utils.c, lines 122 to 124 (as described by Nathan)
> * Ran make all again
> * Copied the new compiled executable check_ping plugin to libexec
> * Stopped and restarted Nagios, waiting for a timeout.  Timeout
still
> shows critical
> 
> Thoughts or suggestions?  Thanks in advance.
> 
> Nolan
> 
> >>> nathan <nathan at sysadminsith.org> 09/26/02 04:12PM >>>
> If I remember correctly I believe I had to modify utils.c (line
> 122/124)
> and change CRITICAL to WARNING and recompile the plugins....
> 
> When I did this I had compiled all plugins "stock" and then modified
> and
> recompiled so I had a modified version of check_by_ssh which was the
> one
> specific plugin I wanted only warnings for timeouts from.  
> 
> I think I ran strings on the binary plugin and found that modifying
> the
> .c for the plugin alone was not returning desired results 8-)
> 
> Best of luck,
> 
> Nathan
> 
> On Thu, Sep 26, 2002 at 12:41:49PM -0500, Nolan Martin wrote:
> > I am just now getting around to trying to implement the workaround
> > Nathan suggested awhile back, and have been unsuccessful so far.
> > 
> > I modified the check_ping.c file, lines 119 through 122 to the
> > following:
> > 
> > 	if (pl >= cpl || rta >= crta)
> > 		result = STATE_CRITICAL;
> > 	else if (pl >= wpl || rta >= wrta || rta < 0)
> > 		result = STATE_WARNING;
> > 
> > Basically, I moved the rta < 0 statement from resulting in a
> CRITICAL
> > state to resulting in a WARNING state, assuming that that the rta
<
> 0
> > statement is what is determining a timeout. 
> > 
> > I then recompiled the plugins and copied over the new check_ping
> > executable to libexec.  However, timeouts continue to generate
> CRITICAL
> > alerts, and not WARNING alerts.
> > 
> > Admittedly, I have limited development experience, particularly
with
> C.
> >  Can you tell me if I am completely off base or just missing some
> steps?
> >  I would greatly appreciate the additional assistance.
> > 
> > Nolan Martin
> > 
> > >>> nathan <nathan at sysadminsith.org> 08/20/02 04:35PM >>>
> > To stop the spam of alerts I recompiled my plugins so that
timeouts
> > were
> > warnings and not critical then setup my contacts to not get
alerted
> on
> > service warnings.
> > 
> > On Tue, Aug 20, 2002 at 04:24:20PM -0500, Nolan Martin wrote:
> > > I've seen this issue pop up several times in the archives, but
> > without
> > > any apparent resolution...  Perhaps someone can shed some light
> this
> > > time.  
> > > 
> > > I receive on-going (unexpected and undesired) service alerts due
> to
> > > timed out plugins.  This occurs for pretty much any service,
> > including
> > > the check_ping, the check_http and check_nwstat (for abends,
> etc.).
> > > 
> > > The problem is that the plugin timed out alerts do not seem to
> > follow
> > > the max_check_attempts for the service.  So, even if the
previous
> > ping
> > > was okay, if the next ping check generates a time out, it
> > immediately
> > > generates a service alert (despite the fact that
> max_check_attempts
> > is
> > > set to 5.
> > > 
> > > Can someone tell me if this is working as designed, a bug, or
> > (always
> > > unlikely) administrator error?
> > > 
> > > I am currently running Nagios 1.0b3 on Red Hat Linux 7.3.  
> > > 
> > > Thanks.
> > > 
> > > Nolan
> > > 
> > > 
> > > 
> > > 
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by: OSDN - Tired of that same old
> > > cell phone?  Get a new here for FREE!
> > > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 
> > > _______________________________________________
> > > Nagios-users mailing list
> > > Nagios-users at lists.sourceforge.net 
> > > https://lists.sourceforge.net/lists/listinfo/nagios-users 
> > 
> > -- 
> > Nathan
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by: OSDN - Tired of that same old
> > cell phone?  Get a new here for FREE!
> > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/nagios-users 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf 
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/nagios-users 
> 
> -- 
> Nathan the human
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/nagios-users 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/nagios-users 




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list