R: Notify on sigle events

Schmitz, Carsten Carsten.Schmitz at aegon.com
Wed Jan 19 17:17:23 CET 2005


> Well, my customer want to receive notifications every time some particular
> strings are written inside that log file.
> Probably Nagios can not do this ....

Dunno, there is a ./check_log in the regular plugin distribution but I don't think it does what you need.

The plain way (without Nagios) would probably be like this:  An entry (which signifies a problem I guess) gets written into an Oracle log file, script greps for that string from cron, and if the grep finds a corresponding line (that'd be [ "$?" -eq "0" ] I think) then it would trigger an e-mail/pager/carrier pigeon to alert some person.  You could do that without using Nagios at all, but you need to add some logic so it doesn't email people repeatedly for the same entry (if your log file has time stamps, its only a matter of extracting it (awk) and making a lock file for that time stamp in /tmp (carefull if your /tmp is wiped at reboot ;)

If you want to invoke Nagios, it depends on your procedure. Is someone reacting to the alert by looking at the system and "fixing" Oracle? If yes, you could require him to take some action which "acknowledges" the problem and makes your check script assume "ok" for this particular log entry, returning a final "ok" (read: exit 0) to Nagios if no other "unacknowledged" entries are present. Or maybe you could even work with Nagios built-in "Problem Acknowledgment" feature (dunno if it can have an event handler of some sort).

But if 10 log entries are added in short time, the poor guy will have to do a lot of "acknowledgeing". Depends on the type of log entry you monitor, and your working procedures for handling the log entry I guess.

Hence, my $0.02 (actually, that'd be 0.02 eurocents) is that in most cases i'd probably just use cron for this one (or, I'd do a search for log file monitors on sf.net, someone must have invented that wheel before :)

Cheers,

---------------------------------------------------------------------- 
Carsten Schmitz                                             AEGON N.V. 
System Administrator                                     AEGONplein 50 
Group Information Management                          2591TV The Hague 
                                                       The Netherlands 
---------------------------------------------------------------------- 
     "My password is my cat's name. Its called x6>B8e at 7w_4.
                  I rename it every 30 days."
---------------------------------------------------------------------- 




-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Marco
Borsani
Sent: Wednesday, January 19, 2005 3:17 PM
To: Stephan Janosch
Cc: nagios-users at lists.sourceforge.net
Subject: R: R: [Nagios-users] Notify on sigle events



-}Marco Borsani wrote:
-}> -}Perhaps you can write a wrapper or a plugin which can handle this
-}> -}particular situation.
-}> -}
-}> -}Stephan
-}> -}
-}>
-}> I wrote the plugin to check the log file, but I have not idea
-}how to handle
-}> the notifications because there are not CRITICAL and (after) OK
-}status (like
-}> usual).
-}>
-}> Marco
-}>
-}
-}Perhaps I missunderstood your problem. But If you need to monitor
-}something, than you also need to know, when there is a problem. If you
-}can't see at least two different states, I have no idea to monitor
-}something.
-}

Well, my customer want to receive notifications every time some particular
strings are written inside that log file.
Probably Nagios can not do this ....

Marco




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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