Xymon Mailing List Archive search

sending particular alert message to particular users

5 messages in this thread

list Camelia Anghel · Thu, 10 Sep 2009 09:43:38 -0400 ·
 
Hello,
This is how my hobbit-client.cfg and hobbit-alerts.cfg look and I would
like to send the first LOG to some users and the second LOG to different
users.
How do I send an alert based on a warning expression?
 
Hobbit-client.cfg
  HOST=myhost.org
  LOG /var/log/messages %failure*|%failed*|%error*|%Warning* COLOR=red
  LOG /var/log/www_server_4881.log %exceeded* COLOR=red
 
Hobbit-alerts.cfg
HOST=myhost.org
          MAIL user-ba19520bfb26@xymon.invalid SERVICE=msgs REPEAT=30m COLOR=red
RECOVERED
 
Any help, suggestion will be appreciated
 
Thanks,
Camelia Anghel 
user-56034f999072@xymon.invalid
list Greg Hubbard · Thu, 10 Sep 2009 09:37:55 -0500 ·
I don't think you can do this via the standard alerts function (because all
log messages are grouped into the one "msg" test).  However, you might be
able to do what you want if you call a script and have the script examine
the message content and then send the email to the proper user.

GLH
quoted from Camelia Anghel


On 9/10/09, Camelia Anghel <user-56034f999072@xymon.invalid> wrote:

Hello,

This is how my hobbit-client.cfg and hobbit-alerts.cfg look and I would
like to send the first LOG to some users and the second LOG to different
users.

How do I send an alert based on a warning expression?


Hobbit-client.cfg

  HOST=myhost.org

  LOG /var/log/messages %failure*|%failed*|%error*|%Warning* COLOR=red

  LOG /var/log/www_server_4881.log %exceeded* COLOR=red


Hobbit-alerts.cfg

HOST=myhost.org

          MAIL user-ba19520bfb26@xymon.invalid SERVICE=msgs REPEAT=30m COLOR=red
RECOVERED


Any help, suggestion will be appreciated


Thanks,

Camelia Anghel

user-56034f999072@xymon.invalid
-- 

Disclaimer:  1) all opinions are my own, 2) I may be completely wrong, 3) my
advice is worth at least as much as what you are paying for it, or your
money cheerfully refunded.
list Camelia Anghel · Thu, 10 Sep 2009 10:56:12 -0400 ·
Does anyone have such a unix script? I would not want to reinvent the
wheel if I can modify it...
Thanks,
Camelia  
 
-----Original Message-----
From: Greg Hubbard [mailto:user-435e16ecfd6a@xymon.invalid] 
Sent: Thursday, September 10, 2009 10:38 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] sending particular alert message to particular
users
quoted from Greg Hubbard
 
I don't think you can do this via the standard alerts function (because
all log messages are grouped into the one "msg" test).  However, you
might be able to do what you want if you call a script and have the
script examine the message content and then send the email to the proper
user.
 
GLH

 
On 9/10/09, Camelia Anghel <user-56034f999072@xymon.invalid> wrote: 
 
Hello,
This is how my hobbit-client.cfg and hobbit-alerts.cfg look and I would
like to send the first LOG to some users and the second LOG to different
users.
How do I send an alert based on a warning expression?
 
Hobbit-client.cfg

  HOST=myhost.org <http://myhost.org/>; 
  LOG /var/log/messages %failure*|%failed*|%error*|%Warning* COLOR=red
  LOG /var/log/www_server_4881.log %exceeded* COLOR=red
 
Hobbit-alerts.cfg
HOST=myhost.org <http://myhost.org/>; 
quoted from Greg Hubbard
          MAIL user-ba19520bfb26@xymon.invalid SERVICE=msgs REPEAT=30m COLOR=red
RECOVERED
 
Any help, suggestion will be appreciated
 
Thanks,
Camelia Anghel 
user-56034f999072@xymon.invalid


-- 
Disclaimer:  1) all opinions are my own, 2) I may be completely wrong,
3) my advice is worth at least as much as what you are paying for it, or
your money cheerfully refunded.
list Alan Sparks · Thu, 10 Sep 2009 09:37:54 -0600 ·
quoted from Camelia Anghel
Camelia Anghel wrote:
 
Hello,

This is how my hobbit-client.cfg and hobbit-alerts.cfg look and I
would like to send the first LOG to some users and the second LOG to
different users.

How do I send an alert based on a warning expression?

 
Hobbit-client.cfg

  HOST=myhost.org

  LOG /var/log/messages %failure*|%failed*|%error*|%Warning* COLOR=red

  LOG /var/log/www_server_4881.log %exceeded* COLOR=red

 
Hobbit-alerts.cfg

HOST=myhost.org

          MAIL user-ba19520bfb26@xymon.invalid SERVICE=msgs REPEAT=30m COLOR=red
RECOVERED

 
Any help, suggestion will be appreciated

 
Thanks,

Camelia Anghel

user-56034f999072@xymon.invalid
You might experiment with the GROUP= directive, see documentation for it
in the hobbit-clients.cfg and hobbit-alerts.cfg man pages.

Maybe something like:

Hobbit-client.cfg

  HOST=myhost.org

      LOG /var/log/messages %failure*|%failed*|%error*|%Warning*
COLOR=red GROUP=mypeople

      LOG /var/log/www_server_4881.log %exceeded* COLOR=red GROUP=yourpeople

 
Hobbit-alerts.cfg

HOST=myhost.org

      MAIL user-ba19520bfb26@xymon.invalid GROUP=mypeople SERVICE=msgs REPEAT=30m
COLOR=red RECOVERED
      MAIL user-ba19520bfb26@xymon.invalid GROUP=yourpeople SERVICE=msgs REPEAT=30m
COLOR=red RECOVERED

Hope this helps.
-Alan
list Camelia Anghel · Thu, 10 Sep 2009 12:26:20 -0400 ·
Thanks so much! It worked adding Group to my client and alert files.
Camelia 
quoted from Alan Sparks

-----Original Message-----
From: Alan Sparks [mailto:user-8f2174fd8b66@xymon.invalid] 
Sent: Thursday, September 10, 2009 11:38 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] sending particular alert message to particular
users

Camelia Anghel wrote:
 
Hello,

This is how my hobbit-client.cfg and hobbit-alerts.cfg look and I
would like to send the first LOG to some users and the second LOG to
different users.

How do I send an alert based on a warning expression?

 
Hobbit-client.cfg

  HOST=myhost.org

  LOG /var/log/messages %failure*|%failed*|%error*|%Warning* COLOR=red

  LOG /var/log/www_server_4881.log %exceeded* COLOR=red

 
Hobbit-alerts.cfg

HOST=myhost.org

          MAIL user-ba19520bfb26@xymon.invalid SERVICE=msgs REPEAT=30m COLOR=red
RECOVERED

 
Any help, suggestion will be appreciated

 
Thanks,

Camelia Anghel

user-56034f999072@xymon.invalid
You might experiment with the GROUP= directive, see documentation for it
in the hobbit-clients.cfg and hobbit-alerts.cfg man pages.

Maybe something like:

Hobbit-client.cfg

  HOST=myhost.org

      LOG /var/log/messages %failure*|%failed*|%error*|%Warning*
COLOR=red GROUP=mypeople

      LOG /var/log/www_server_4881.log %exceeded* COLOR=red
GROUP=yourpeople

 
Hobbit-alerts.cfg

HOST=myhost.org

      MAIL user-ba19520bfb26@xymon.invalid GROUP=mypeople SERVICE=msgs REPEAT=30m
COLOR=red RECOVERED
      MAIL user-ba19520bfb26@xymon.invalid GROUP=yourpeople SERVICE=msgs REPEAT=30m
COLOR=red RECOVERED

Hope this helps.
-Alan