[Xymon] Alert on Log Entry

Nick Pettefar Nick at Pettefar.com
Thu Feb 7 18:00:35 CET 2013


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 nick at email.com 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 nick at email.com

Regards,

Nick Pettefar


On 6 February 2013 17:55, Nick Pettefar <Nick at pettefar.com> 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 NOC at blah.com SERVICE=log COLOR=red
>
> Can I put something like SERVICE=log:Fail.log="Big-Failure"
>
> Regards,
>
> Nick Pettefar - Xymon Rookie



More information about the Xymon mailing list