<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Monitoring log files.</TITLE>

<META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=246190411-11062003>check_log2.pl is smart enough to know that the log file 
was rotated.  My moitoring server also serves as a syslog server for MS 
Event Logs for a few hundred MS machines that are monitored.  I use a 
combination of syslog-ng and Event-Sentry, and a slightly modified check_log2.pl 
does the work.  All the logs are rotated daily with logrotate.  Works 
great.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=246190411-11062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=246190411-11062003>Lane</SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Webster, Stuart SITI-ITDIUR 
  [mailto:Stuart.Webster@shell.com]<BR><B>Sent:</B> Wednesday, June 11, 2003 
  6:47 AM<BR><B>To:</B> nagios-users@lists.sourceforge.net<BR><B>Subject:</B> 
  [Nagios-users] Monitoring log files.<BR><BR></DIV></FONT><!-- Converted from text/rtf format -->
  <P><FONT face=Arial size=2>Hello</FONT> </P>
  <P><FONT face=Arial size=2>Does any one have any experience and advice for 
  monitoring envirnonments with a lot of log files. </FONT></P>
  <P><FONT face=Arial size=2>So far i have tried the standard check_log that 
  comes with nagios. from my understanding this creates a copy of the log file, 
  this is not really viable for me as it would need too much disk 
  space.</FONT></P>
  <P><FONT face=Arial size=2>I also have tried check_log2.pl from the contrib 
  directory. this works by creating a counter to remember what line it was on 
  for the next check. this works fine untill the log rotates, then when a new 
  log file is created, im presuming the log_check2.pl will not know to start 
  from the beggining of the log.</FONT></P>
  <P><FONT face=Arial size=2>Has anyone solved these problems of rotating log 
  files, the only solution i can think of it to write a cron that changes 
  check_log2.pl's counter to 0 when the logs rotate, but this wil prove a 
  complicated setup.</FONT></P><BR>
  <P><FONT face=Arial size=2>help or ideas appreciated</FONT> </P>
  <P><FONT face=Arial size=2>Stuart</FONT> </P></BLOCKQUOTE></BODY></HTML>