R: Notify on sigle events

Marc Powell marc at ena.com
Wed Jan 19 18:58:56 CET 2005



> -----Original Message-----
> From: Marco Borsani [mailto:m.borsani at it.net]
> Sent: Wednesday, January 19, 2005 10:21 AM
> To: Marc Powell; Stephan Janosch
> Cc: nagios-users at lists.sourceforge.net
> Subject: R: R: [Nagios-users] Notify on sigle events
> 
> >
> -}> Well, my customer want to receive notifications every time some
> -}particular
> -}> strings are written inside that log file.
> -}> Probably Nagios can not do this ....
> -}
> -}Yes, certainly it can and there are plugins that do it. I know of at
> -}least three check_log plugins that are included with the standard
> -}plugins distribution --
> -}
> -}./plugins-scripts/check_log.sh
> -}./plugins-scripts/check_log
> -}./contrib/check_log2.pl
> -}
> -}Read the scripts to see what each is capable of and how to use them
and
> -}choose the one that suits your needs. Failing that, and it should
work
> -}for you, you could always use the guide on SNMP trap integration as
an
> -}alternative method as they both have similar requirements --
> -}
> -}http://nagios.sourceforge.net/docs/2_0/int-snmptrap.html
> -}
> -}I would encourage you to use the check_log scripts though as the
latter
> -}method is really overkill.
> -}
> -}--
> -}Marc
> -}
> 
> Well, I know check_log plugin but it still "change the status" when
match
> the "pattern" (third arguments of the check_log) in Critical and back
to
> normal if nothing change inside the log file.
> The problem is that I need to send only one notification when match
the
> "pattern" but mainteining the OK status.

What will happen is this --

Check 1 - check_log checks the log file, doesn't find the pattern
returns OK
 [rinse, wash, repeat]
 Pattern is logged to the log file.

Check x - check_log checks the log file, finds the pattern, status is
set to critical, Nagios sends notification

Check x+1 - check_log checks the log file, doesn't find the pattern,
returns OK
 [rinse, wash, repeat]

As long as you have Nagios configured to send alerts on the first non-OK
state _and_ not to send notification on recovery, you'll only receive
one alert and it will only show critical in the interface until the next
scheduled check. Nagios will *have* to change the status internally for
the duration of the single check in order to send an alert. This is
completely appropriate behavior as there is a 'problem' with the service
as you've defined 'problem'.

--
Marc



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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