Xymon Mailing List Archive search

Suggestion for Defaults

12 messages in this thread

list Asif Iqbal · Sun, 13 Feb 2005 12:38:07 -0500 ·
Hi

I would like to suggest if it is not only there.

I like a way to set the default for the followings

REPEAT, currently it is 30 and I like to change it not for all my 200
entries separately but as a default value 

I like to have FORMAT assumed as default to TEXT. Right now I have to
atleast mentioned the word FORMAT in all my 200 rules separately

Same thing for COLOR. Currently I have to mention COLOR=red which I like
to set as default. Do I set that in the --alertcolors? BTW, if I choose
COLOR=RED it fails, I assume it is case sensitive ?!

It would be great if I could Add more than one email alias in the same
MAIL line. Save me lot of writing, but It is a mere suggestion and can
be put off forever :-)

There are all the suggestion with the assumption that they are not
already exist.

Thanks for such an excellent tool

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
list Asif Iqbal · Sun, 13 Feb 2005 17:50:48 -0500 ·
▸ quoted from Asif Iqbal
On Sun, Feb 13, 2005 at 12:38:07PM, Asif Iqbal wrote:
Hi

I would like to suggest if it is not only there.

I like a way to set the default for the followings

REPEAT, currently it is 30 and I like to change it not for all my 200
entries separately but as a default value 

I like to have FORMAT assumed as default to TEXT. Right now I have to
atleast mentioned the word FORMAT in all my 200 rules separately

Same thing for COLOR. Currently I have to mention COLOR=red which I like
to set as default. Do I set that in the --alertcolors? BTW, if I choose
COLOR=RED it fails, I assume it is case sensitive ?!

It would be great if I could Add more than one email alias in the same
MAIL line. Save me lot of writing, but It is a mere suggestion and can
be put off forever :-)
Also, would be nice if I can keep a separate file for MACRO definitions.

Definitely a low priority feature--if not available already

Thanks
▸ quoted from Asif Iqbal

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
list Henrik Størner · Mon, 14 Feb 2005 07:58:28 +0100 ·
▸ quoted from Asif Iqbal
On Sun, Feb 13, 2005 at 12:38:07PM -0500, Asif Iqbal wrote:
I like a way to set the default for the followings

REPEAT, currently it is 30 and I like to change it not for all my 200
entries separately but as a default value 
You set the default repeat interval with the "--repeat=N" option for
hobbitd_alert. Change it in etc/hobbitlaunch.cfg .
▸ quoted from Asif Iqbal

I like to have FORMAT assumed as default to TEXT. Right now I have to
atleast mentioned the word FORMAT in all my 200 rules separately
FORMAT=TEXT already is the default setting ...
▸ quoted from Asif Iqbal

Same thing for COLOR. Currently I have to mention COLOR=red which I like
to set as default. Do I set that in the --alertcolors?
If you use "--alertcolors=red" then it cannot be overridden in the
hobbit-alerts.cfg file. So if you do want some tests to send an alert
when they go yellow, then you must use "--alertcolors=red,yellow" (the
default is red,yellow,purple) and add the COLOR=... definition for
each rule or recipient.

BTW, if I choose COLOR=RED it fails, I assume it is case sensitive?!
Yes, it is. I'll change that, having things case-sensitive for no good
reason is just annoying.
▸ quoted from Asif Iqbal

It would be great if I could Add more than one email alias in the same
MAIL line.
This was added in RC2. Doing

    MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red

will work as you expect it to. If you have a macro that expands to
several mail-adresses, then that will work too. Like

    $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"

    HOST=*
        MAIL $ADMINS COLOR=red


Regards,
Henrik
list Henrik Størner · Mon, 14 Feb 2005 07:59:40 +0100 ·
▸ quoted from Asif Iqbal
On Sun, Feb 13, 2005 at 05:50:48PM -0500, Asif Iqbal wrote:
Also, would be nice if I can keep a separate file for MACRO
definitions.
That would make it a lot harder to detect when the configuration was
changed, so I probably will not do that.


Regards,
Henrik
list Asif Iqbal · Mon, 14 Feb 2005 02:06:57 -0500 ·
▸ quoted from Henrik Størner
On Mon, Feb 14, 2005 at 07:58:28AM, Henrik Stoerner wrote:
On Sun, Feb 13, 2005 at 12:38:07PM -0500, Asif Iqbal wrote:
I like a way to set the default for the followings
REPEAT, currently it is 30 and I like to change it not for all my 200
entries separately but as a default value 
You set the default repeat interval with the "--repeat=N" option for
hobbitd_alert. Change it in etc/hobbitlaunch.cfg .

I like to have FORMAT assumed as default to TEXT. Right now I have to
atleast mentioned the word FORMAT in all my 200 rules separately
FORMAT=TEXT already is the default setting ...

Same thing for COLOR. Currently I have to mention COLOR=red which I like
to set as default. Do I set that in the --alertcolors?
If you use "--alertcolors=red" then it cannot be overridden in the
hobbit-alerts.cfg file. So if you do want some tests to send an alert
when they go yellow, then you must use "--alertcolors=red,yellow" (the
default is red,yellow,purple) and add the COLOR=... definition for
each rule or recipient.

BTW, if I choose COLOR=RED it fails, I assume it is case sensitive?!
Yes, it is. I'll change that, having things case-sensitive for no good
reason is just annoying.

It would be great if I could Add more than one email alias in the same
MAIL line.
This was added in RC2. Doing

    MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red

will work as you expect it to. If you have a macro that expands to
several mail-adresses, then that will work too. Like

    $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"

    HOST=*
        MAIL $ADMINS COLOR=red
So let me get this clear. If I setup "--alertcolors=red" in the
hobbitlaunch.cfg file (and restart hobbit) I do not have to add
COLOR=red and FORMAT for the default TEXT alert for RED only to work?

Sorry for such a long question.

Realizing now how simple the alert file now compare to bbwarrules and
bbwarnsetup files

Thank you so much for such an awesome tool
Regards,
Henrik
▸ quoted from Asif Iqbal

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
list Charles Jones · Mon, 14 Feb 2005 00:08:21 -0700 ·
▸ quoted from Asif Iqbal
Henrik Stoerner wrote:
This was added in RC2. Doing

   MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red

will work as you expect it to. If you have a macro that expands to
several mail-adresses, then that will work too. Like

   $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"

   HOST=*
       MAIL $ADMINS COLOR=red
 
Wouldn't that be:

HOST=%.*
      MAIL $ADMINS COLOR=red

The reason I ask is because I am using HOST=%.*, and it seems to be 
working.  I thought it had to be a regex?

-Charles
list Asif Iqbal · Mon, 14 Feb 2005 02:14:22 -0500 ·
▸ quoted from Charles Jones
On Mon, Feb 14, 2005 at 12:08:21AM, Charles Jones wrote:
Henrik Stoerner wrote:
This was added in RC2. Doing

  MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red

will work as you expect it to. If you have a macro that expands to
several mail-adresses, then that will work too. Like

  $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"

  HOST=*
      MAIL $ADMINS COLOR=red

Wouldn't that be:

HOST=%.*
     MAIL $ADMINS COLOR=red
Both are right. You start with % if you choose to go with perl regular
expr
▸ quoted from Charles Jones

The reason I ask is because I am using HOST=%.*, and it seems to be 
working.  I thought it had to be a regex?

-Charles

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
list Henrik Størner · Mon, 14 Feb 2005 10:09:50 +0100 ·
▸ quoted from Charles Jones
On Mon, Feb 14, 2005 at 12:08:21AM -0700, Charles Jones wrote:
Henrik Stoerner wrote:
  $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"

  HOST=*
      MAIL $ADMINS COLOR=red
Wouldn't that be:

HOST=%.*
     MAIL $ADMINS COLOR=red

The reason I ask is because I am using HOST=%.*, and it seems to be 
working.  I thought it had to be a regex?
"HOST=*" is a special-case meaning "match anything". It was so simple
to implement, and obviously useful (I think), so I added that some
time ago.

Your regex will also work, and is the recommended way of doing
wildcard matches.


Henrik
list Henrik Størner · Mon, 14 Feb 2005 10:12:49 +0100 ·
▸ quoted from Asif Iqbal
On Mon, Feb 14, 2005 at 02:06:57AM -0500, Asif Iqbal wrote:
On Mon, Feb 14, 2005 at 07:58:28AM, Henrik Stoerner wrote:
On Sun, Feb 13, 2005 at 12:38:07PM -0500, Asif Iqbal wrote:
Same thing for COLOR. Currently I have to mention COLOR=red which I like
to set as default. Do I set that in the --alertcolors?
If you use "--alertcolors=red" then it cannot be overridden in the
hobbit-alerts.cfg file. So if you do want some tests to send an alert
when they go yellow, then you must use "--alertcolors=red,yellow" (the
default is red,yellow,purple) and add the COLOR=... definition for
each rule or recipient.
So let me get this clear. If I setup "--alertcolors=red" in the
hobbitlaunch.cfg file (and restart hobbit) I do not have to add
COLOR=red and FORMAT for the default TEXT alert for RED only to work?
Correct. And the restart will happen automatically.
▸ quoted from Asif Iqbal
Sorry for such a long question.

Realizing now how simple the alert file now compare to bbwarrules and
bbwarnsetup files
That was the general idea :-) I've never liked the old BB alert setup.
Thank you so much for such an awesome tool

Regards,
Henrik
list Asif Iqbal · Mon, 21 Feb 2005 14:03:10 -0500 ·
▸ quoted from Asif Iqbal
On Mon, Feb 14, 2005 at 07:58:28AM, Henrik Stoerner wrote:
On Sun, Feb 13, 2005 at 12:38:07PM -0500, Asif Iqbal wrote:
[...] 
This was added in RC2. Doing

    MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red

will work as you expect it to. If you have a macro that expands to
several mail-adresses, then that will work too. Like

    $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"

    HOST=*
        MAIL $ADMINS COLOR=red
I noticed if I have it setup like this

HOST=* SERVICE=msgs
	SCRIPT /path/to/script user-4dad1745a785@xymon.invalid user-55e81cd8542e@xymon.invalid FORMAT=TEXT

And then I did a test like ./bin/bbcmd hobbitd_alert --test host1 msgs 
I get like this

 *** Match with 'HOST=* SERVICE=msgs' ***
Script alert with command '/path/to/script' and recipient user-4dad1745a785@xymon.invalid
Mail alert with command 'mailx -s "BB [12345] host1:msgs is RED" user-55e81cd8542e@xymon.invalid'

Shouldn't the second like also be part of Script alert instead of Mail
alert?

Thanks for your help

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
 the one most responsive to change."    - Charles Darwin
list Asif Iqbal · Mon, 21 Feb 2005 16:02:48 -0500 ·
▸ quoted from Asif Iqbal
On Mon, Feb 21, 2005 at 02:03:10PM, Asif Iqbal wrote:
On Mon, Feb 14, 2005 at 07:58:28AM, Henrik Stoerner wrote:
On Sun, Feb 13, 2005 at 12:38:07PM -0500, Asif Iqbal wrote:
[...] > This was added in RC2. Doing
    MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red
will work as you expect it to. If you have a macro that expands to
several mail-adresses, then that will work too. Like
    $ADMINS="user-b7c20e0da76a@xymon.invalid user-143c88f2d522@xymon.invalid"
    HOST=*
        MAIL $ADMINS COLOR=red
I noticed if I have it setup like this

HOST=* SERVICE=msgs
	SCRIPT /path/to/script user-4dad1745a785@xymon.invalid user-55e81cd8542e@xymon.invalid FORMAT=TEXT

And then I did a test like ./bin/bbcmd hobbitd_alert --test host1 msgs I get like this

 *** Match with 'HOST=* SERVICE=msgs' ***
Script alert with command '/path/to/script' and recipient user-4dad1745a785@xymon.invalid
Mail alert with command 'mailx -s "BB [12345] host1:msgs is RED" user-55e81cd8542e@xymon.invalid'

Shouldn't the second like also be part of Script alert instead of Mail
alert?
I also noticed that same alert related to the same line in
/var/adm/messages is keep coming every 5 mins when I you SCRIPT. It
seems not the case with MAIL
▸ quoted from Asif Iqbal
Thanks for your help

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
 the one most responsive to change."    - Charles Darwin

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
 the one most responsive to change."    - Charles Darwin
list Henrik Størner · Mon, 21 Feb 2005 22:04:14 +0100 ·
▸ quoted from Asif Iqbal
On Mon, Feb 21, 2005 at 02:03:10PM -0500, Asif Iqbal wrote:
On Mon, Feb 14, 2005 at 07:58:28AM, Henrik Stoerner wrote:
On Sun, Feb 13, 2005 at 12:38:07PM -0500, Asif Iqbal wrote:
[...] 
This was added in RC2. Doing

    MAIL user-b7c20e0da76a@xymon.invalid user-ef86c43926b6@xymon.invalid COLOR=red

will work as you expect it to.
I noticed if I have it setup like this

HOST=* SERVICE=msgs
	SCRIPT /path/to/script user-4dad1745a785@xymon.invalid user-55e81cd8542e@xymon.invalid FORMAT=TEXT

Shouldn't the second like also be part of Script alert instead of Mail
alert?
It's a bug, and I literally found it just half an hour before your
mail (must be telepathy or something).


Regards,
Henrik