Xymon Mailing List Archive search

Alert on Log Entry

list Nick Pettefar
Thu, 7 Feb 2013 17:00:35 +0000
Message-Id: <CAA9hN5MUj-yi9JFnRhq=user-04193aad6d48@xymon.invalid>

Well, the answer is to use the "GROUP" keyword after the test.

On the Xymon server:
In the ~xymon/server/etc/analysis.cfg file, use this:
  HOST=sparky
     LOG /tmp/test.log wibble COLOR=red GROUP=wibble

("wibble" is the keyword to check on in the log file and red is the
colour to set the web page "msgs" icon to.)

In the ~xymon/server/etc/alerts.cfg file, use this:
  GROUP=wibble
    MAIL user-4a93aacab394@xymon.invalid SERVICE=log FORMAT=PLAIN COLOR=red

On the Xymon client.
In the ~xymon/server/etc/client-local.cfg file, use this:
  log:/tmp/test.log:1024

This will collect up to 1024 lines from the log file.  Adjust accordingly.

Now if "wibble" appears in the /tmp/test.log file, an e-mail will be
sent to user-4a93aacab394@xymon.invalid

Regards,

Nick Pettefar


On 6 February 2013 17:55, Nick Pettefar <user-2027539dd102@xymon.invalid> wrote:
Hi, is it possible to configure the alerts.cfg file to send an e-mail
if a server's particular log has a certain entry?

I have

HOST=server-abc-ge1
   MAIL user-bbed4d766b23@xymon.invalid SERVICE=log COLOR=red

Can I put something like SERVICE=log:Fail.log="Big-Failure"

Regards,

Nick Pettefar - Xymon Rookie