R: R: R: Notify on sigle events

Stephan Janosch stephan.janosch at interface-business.de
Thu Jan 20 11:37:37 CET 2005


Marco Borsani wrote:
> -}> 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.
> -}>
> -}> Marco
> -}
> -}Ah okay. Notifications are only sent out, if a status goes to WARNING OR
> -}CRTITCAL. So you need a plugin which changes its status otherwise you
> -}won't get a notification. If you don't want a state change in nagios,
> -}you can still setup a cron job.
> -}
> -}It looks like, a cron job in cunjunction with a small shell script
> -}around check_log2.pl fits your needs much better, than nagios.
> -}
> -}Another question: Why is it so important to maintain OK status? Where is
> -}the problem, if the state changes?
> 
> I will never receive a message to return to an "OK status", so if nagios set
> a "Critical status", nagios will maintain it forever!
> 
> If would be possible to set "manually" a service state (for example with a
> shell script) to OK, I will not have any problem. In this case I could
> receive one notifications when "the strings" are written in the log file,
> but none "RED ALERT" appears in the web interface!

check_log2.pl goes back to green, if there is no new string in the 
logfile appearing.

Example:
-check_log2 goes through your logfile -> nothing found -> return 0 -> OK

-your app writes something new into the logfile, NOT the expected string

-check_log2 realises the grown logfile, so checks only new stuff and 
finds nothing -> return 0 -> OK

-your app logs the expected string

-check_log2 again checks only the new stuff, finds the string -> return 
1 -> WARNING

-your app writes something new into the logfile, NOT the expected string

-check_log2 realises the grown logfile, so checks only new stuff and 
finds nothing -> return 0 -> OK

As you could see, we have a state change here. OK -> WARNING -> OK


That is how check_log2.pl works. I have it here in hot use, and it works 
very well. So I don't understand you, when you say, Nagios stays in 
"critical" (or warning) status. That is simply incorrect. You don't need 
  to set the service status back to OK. This is done by the logic of 
check_log2.pl.

I hope, my explainations are understandable!

Stephan



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