<br><font size=2 face="sans-serif">A log file monitor would also need to
consider what happens when logrotate (or other switching mechanism) switches
logs, as the inode and file offset may (or will) change. I know some people
have a cron job which copies the log, then truncates the original log file.
In this case the inode won't change, but the file contents / offset will.
There are many things to consider, I'm sure Henrik will come up with a
good solution. </font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Manu <yoogie@schurkennetz.de></b>
</font>
<p><font size=1 face="sans-serif">11/29/2005 05:38 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
hobbit@hswn.dk</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">hobbit@hswn.dk</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [hobbit] hobbitclient + msgs test
sugesstion</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hi,<br>
<br>
Why should the log-entries, hobbit-msg-monitor should look after be <br>
maintained centrally on the hobbit server? Are important log-entries <br>
essential on a sql-server as well in every case as on a firewall? I <br>
think that there are different things on different servers you want <br>
hobbit to take care about...<br>
Maybe I missed the point...<br>
<br>
To reduce overhead, you can use a similar mechanism as logtail does. <br>
Storing the file offset in conjunction with the inode-id would grant <br>
you never check an entry twice.<br>
<br>
Maybe, having a closer look at logsentry from the sentry-tools <br>
(http://sourceforge.net/projects/sentrytools) would help finding an <br>
appropriate way of realizing this.<br>
<br>
Kind regards,<br>
<br>
Manuel<br>
<br>
<br>
<br>
<br>
----- Message from iqbala-hobbit@qwestip.net ---------<br>
     Date: Tue, 29 Nov 2005 16:42:21 -0500<br>
     From: Asif Iqbal <iqbala-hobbit@qwestip.net><br>
Reply-To: hobbit@hswn.dk<br>
  Subject: Re: [hobbit] hobbitclient + msgs test sugesstion<br>
       To: hobbit@hswn.dk<br>
<br>
<br>
> On Tue, Nov 29, 2005 at 10:09:48PM, Henrik Stoerner wrote:<br>
>> Hi Peter (and anyone else interested),<br>
>><br>
>> On Tue, Nov 29, 2005 at 08:26:14PM +0100, Peter Welter wrote:<br>
>> ><br>
>> > Since the msgs-check is not available yet in the Hobbit display,
I<br>
>> > want to make a suggestion to have it enabled relatively easy.
I think<br>
>> > of two methods:<br>
>> ><br>
>> > -1- A client must have read access to the file [client picks
out the<br>
>> >     "interesting" bits]<br>
>> ><br>
>> > -2- Your Hobbit server must _also_ be a central loghost.
[allows<br>
>> >     centralized configuration of how to monitor
the logs]<br>
>><br>
>> I'm not really thrilled with either of these - sorry! Each of
them<br>
>> have some drawbacks: The first one moves the configuration of
what<br>
>> logs to monitor away from the central hobbit server, and the<br>
>> second one only works for logs that go through the syslog interface.<br>
>> If I want to monitor e.g. an Apache webserver error-log, or the<br>
>> custom logs from a BEA server, solution 2) won't work. I dont
see<br>
>> how it can work with logs from a Windows server either. Plus it<br>
>> adds load to the central Hobbit server to deal with all of the<br>
>> logfiles.<br>
>><br>
>> So - I think some other solution is needed, and I've been thinking<br>
>> about how to do it. So far it's just ideas - no code. But I believe<br>
>> the log checking has to happen on each client, but controlled
by<br>
>> a central configuration. So what I plan to implement is something<br>
>> like this:<br>
>><br>
>> * The configuration of what logs to monitor and what strings to<br>
>>   look for is maintained on the central Hobbit server, either
as<br>
>>   an addition to the hobbit-clients.cfg file, or in a separate<br>
>>   file - that isn't really important.<br>
>> * When a client connects and sends in a client-side message, the<br>
>>   Hobbit server accepts the client message, but also sends
back<br>
>>   the current log-check configuration info. By re-using the<br>
>>   client connection, the overhead involved in pushing the<br>
>>   configuration to each client becomes almost nil.<br>
>> * When the client has a log-check configuration, it knows what
logs<br>
>>   to check for what strings, and can include that information
in<br>
>>   the normal client message it sends back to the Hobbit server.<br>
>>   That means the client will need a tool to do the logfile
checking;<br>
>>   probably using a client-side regular-expression matching
tool<br>
>>   like "grep". It can either be built into the
Hobbit client, or<br>
>>   it could just rely on the existing "grep" utility
found on the<br>
>>   system - this would probably be the simplest to implement.<br>
><br>
> Would it be possible to create a new hobbitd channel that will get<br>
> install with hobbit client. Then add that channel to the syslog.conf<br>
> which is kind a work like a pipe. So when syslog say related to<br>
> /var/adm/messages file get send to the hobbitd channel (or pipe) it
will<br>
> scan right away against strings that needs to get alerted about. Also
it<br>
> won't store anything in the channel. So there is no chance to scan
the<br>
> same string on the same timestamp twice. Also if it is not receiving
any<br>
> alert for say 5 mins it will check if syslogd is actually running
by<br>
> sending a 'logger' output to the channel.<br>
><br>
> Sorry if I talking 'no sense' but throwing anything here while the
idea<br>
> is still cooking :-)<br>
><br>
> Thanks<br>
><br>
>><br>
>><br>
>> Regards,<br>
>> Henrik<br>
>><br>
>><br>
>> To unsubscribe from the hobbit list, send an e-mail to<br>
>> hobbit-unsubscribe@hswn.dk<br>
>><br>
>><br>
><br>
> --<br>
> Asif Iqbal<br>
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu<br>
> "..there are two kinds of people: those who work and those who
take <br>
> the credit...try<br>
>  to be in the first group;...less competition there."  -
Indira Gandhi<br>
><br>
> To unsubscribe from the hobbit list, send an e-mail to<br>
> hobbit-unsubscribe@hswn.dk<br>
><br>
><br>
><br>
><br>
><br>
<br>
<br>
----- End message from iqbala-hobbit@qwestip.net -----<br>
<br>
<br>
<br>
<br>
<br>
To unsubscribe from the hobbit list, send an e-mail to<br>
hobbit-unsubscribe@hswn.dk<br>
<br>
<br>
</tt></font>
<br>