Change timeout alerts from CRITICAL to WARNING
Nolan Martin
Nolan.Martin at co.travis.tx.us
Fri Sep 27 15:38:09 CEST 2002
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.
* 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
More information about the Users
mailing list