[hobbit] system log and application log monitoring

Jeff Newman jeffnewman75 at gmail.com
Fri Jun 2 18:03:52 CEST 2006


Henrik,

Is there a facility already in place, or a way to graph the number of "hits"
returned by a pattern match for a log file?

For instance:

I am checking xyz log file for the word "wrap" It would be *very* useful to have
a graph that shows the number of times that word showed up between the previous
check and the current check.

This could be very useful to illustrate, say, a disk dying (one blip
of a bad read or something would be one thing, but looking at a graph
over time that shows 1 blip one week, 10 the next, and 20 the week
after that would indicate the disk was almost dead) etc...

Right now, the only way I have to do this is with a client side script that
runs in a constant loop:

while true; do
   NUM=`grep "Buffer wrapped" /quotes/env/errlog | wc -l | sed 's/  *//g'`
   if [ $NUM -gt $INITIALNUM ] ; then
      WRAP_NUM=`expr $NUM - $INITIALNUM`
      $BB $BBDISP "status $MACHINE.wraps green `date`
      `echo "wraps:$WRAP_NUM"`
      "
      INITIALNUM=$NUM
   else
      OKNUM=0
      $BB $BBDISP "status $MACHINE.wraps green `date`
      `echo "wraps:$OKNUM"`
      "
   fi

-Jeff

On 5/28/06, Henrik Stoerner <henrik at hswn.dk> wrote:
> On Sun, May 21, 2006 at 07:29:49PM +0200, Olivier Beau wrote:
> >
> > well.. i was glad to find OS log files definitions in client-local.cfg
> > Could there be basic OS pattern definitions in hobbit-client.cfg's DEFAULT ?
>
> You'll have to contribute some, then. I don't really know what people
> are looking for in their logfiles.
>
> > next step: application log monitoring
> > let's say i have 100 servers (differents OS of course) running mysql, and i want
> > to follow "ended" in /var/log/mysqld.log
> > ->setting up 100 entries in client-local.cfg doesn't seem great, could there be
> > some kind of grouping in client-local.cfg (PAGE actually..) ? (i guess this
> > would required to processing client-local.cfg before transferring to the clients..)
>
> Welcome to the world of configuration "classes".
>
> Step 1: Put a "CLASS:mysqlservers" on those hosts in bb-hosts.
> Step 2: Put a section in your client-local.cfg file with
>   [mysqlservers]
>   logfile:/var/log/mysql/status.log
> Step 3: Configure hobbit-clients.cfg for these logfiles.
>
> Only problem is that you'll need todays snapshot for this to work.
>
>
> Regards,
> Henrik
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>



More information about the Xymon mailing list