[Nagiosplug-devel] Log Status Checking

Charles H. Baker cbaker at windstream.com
Wed May 5 23:00:10 CEST 2010


On Wed, 2010-05-05 at 13:36 -0700, Brian Milnes wrote:
> Charles,
> 
>  So do you then setup Nagios to check each log only once? If you
> configure to retry only once and you get any
> failures to load, then you'll get a page.
> 
> Although it does look more efficient than check_logs at least. 1/2 the
> problem solved.
> 
>  -B

I'm not sure I'm following the question or getting to the root of the
problem. check_logfiles sets a check point and then next time thru
ignores errors prior to that check point. If it finds new error(s) it
pages again. No new error(s) sets status back to OK. If I'm missing your
point please forgive me, I've had very little sleep in the last 5 or 6
days.




> 
> 
> 
> On Wed, May 5, 2010 at 10:27 AM, Charles H. Baker <cbaker at windstream.com> wrote:
> > I prefer check_logfiles:
> >
> > http://labs.consol.de/lang/en/nagios/check_logfiles/
> >
> > On Wed, 2010-05-05 at 10:21 -0700, Brian Milnes wrote:
> >> Folks,
> >>
> >>  I've got some difficulty with the way(s) that I can get Nagios to
> >> perform log status checking.
> >> Can someone please validate or refute my current setup.
> >>
> >> a) I need to check logs for the presence of every FATAL and ERROR.
> >> b) check_log (and similar) will do this but
> >>
> >> c) check_log keeps state by copying the entire log (into something
> >> like X.log.old) which
> >>      wastes time and money (if you're in the cloud and paying for IO)
> >> d) when check_log returns other than OK, nagios rechecks and then
> >> check_log thinks
> >>      "I've read the whole log, remembered that I'm past that last
> >> ERROR, so I'm OK now"
> >>    and I don't get my page.
> >> e) If I set the check's retry to 1 to work around this,  and I miss a
> >> socket connection, for whatever reason
> >>   then I'm going to get a night time page on my FATAL checker.
> >>
> >>  For other monitoring systems I've built a C program that ran like this:
> >>  check_log_smart -S <SEQUENCE_NUMBER> -L logfile -T statefile -P
> >> APATTERN -P ANOTHERPATTERN
> >>  where statefile= <BYTELASTREAD,LAST_SEQUENCE_NUMBER>.
> >>
> >>  Can Nagios send along a sequence number? Does anyone have a smarter
> >> NRPE plugin for this?
> >>
> >> Thanks, Brian Milnes
> > --
> > Charles H. Baker, Unix System Administration
> > Windstream Communications
> > Charles.Baker at windstream.com | 864.331.7896 | 864.990.1297
> > Risk! Risk anything! Care no more for the opinion of others, for those
> > voices. Do the hardest thing on earth for you. Act for yourself. Face
> > the truth. Katherine Mansfield
> >


-- 
Charles H. Baker, Unix System Administration
Windstream Communications
Charles.Baker at windstream.com | 864.331.7896 | 864.990.1297
We may encounter many defeats, but we must not be defeated. Maya Angelou




More information about the Devel mailing list