[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bigsister-general] Using the logfile monitor


On Tue, 30 Aug 2005 18:07:32 +0200, Thomas Aeby <suppressed> wrote:

On Tue, 2005-08-30 at 17:33 +0200, Andrew Miehs wrote:
is it possible to do the following?

(web\d\d).+INFO    green    0    Good    $1.testname
(web\d\d).+ERROR    red    5    Bad    $1.testname

as it does not seem to be working...

$1 does not seem to be replaced in the hostname part (or am I trying
to use a feature that doesn't exist).

It is not necessary (or rather: it is not the way how it works). The
log file monitor will automatically detect the name of the system that
logged the message and will associate the result with this host, so

  INFO		green	0	Good	column
  BAD		red	5	Bad	column

will report BAD in websrv1.column if it runs over a line like

  Aug 30 18:05:10 websrv1 BAD: something bad happening

Best regards,
Tom

I have a couple of situations where the originating host from syslogd's (and thus the syslog monitor's) point of view isn't the system I want to report certain events on. So I made a small fix to 0.99b2 to allow just the syntax Andrew wants.
If there is interest for it, I can post a patch.

In Andrew's case, though, the correct solution is probably to configure the base logfile monitor to understand which column in the webserver logfile is the hostname. Probably this means creating a "weblog" subclass to logfile, like the syslog and eventlog subclasses that already exist. Assuming he can't persuade his webserver to write a logfile in syslog format.

Right, Tom?

Peter
--
Peter Værlien
Fritz Aabakkens vei 17, 7072 Heimdal, Norway
Telephone: 917 69 384, E-Mail: suppressed
http://varlien.home.online.no



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bigsister-general mailing list
suppressed
https://lists.sourceforge.net/lists/listinfo/bigsister-general


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.