Xymon Mailing List Archive search

Lines to flag red or yellow in msgs

8 messages in this thread

list Josh Luthman · Mon, 10 Mar 2008 15:37:08 -0400 ·
Is it possible for me to define lines that appear in msgs to activate a red
or yellow alert?

I have a bond0 interface (bonded interface consisting of eth0 and eth1) and
if I unplug and plug the cat5 cable (simulating it being down) I get these
messages:

Mar 10 14:48:15 hostname kernel: e100: eth1: e100_watchdog: link down
Mar 10 14:48:15 hostname kernel: bonding: bond0: link status definitely down
for interface eth1, disabling it
Mar 10 14:48:17 hostname kernel: e100: eth1: e100_watchdog: link up,
100Mbps, full-duplex
Mar 10 14:48:17 hostname kernel: bonding: bond0: link status definitely up
for interface eth1.

The /var/log/messages is definitely making it to the Hobbit Server as I can
see the text on the msgs web page, but it isn't flagging them as a bad
message.

Josh

-- 
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Dirk Kastens · Tue, 11 Mar 2008 08:32:54 +0100 ·
Hi Josh,
quoted from Josh Luthman

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to activate a red or yellow alert?
Of course. You have to define a match-pattern and a COLOR statement in the LOG entry of your client configuration file. This is explained inside the client config file localclient.cfg, if you use client side configuration.

-- 
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470
list Josh Luthman · Tue, 11 Mar 2008 08:46:34 -0400 ·
Is there an equal way to do the same thing on the server side?
quoted from Dirk Kastens


On 3/11/08, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi Josh,

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to activate a
red or yellow alert?
Of course. You have to define a match-pattern and a COLOR statement in
the LOG entry of your client configuration file. This is explained
inside the client config file localclient.cfg, if you use client side
configuration.

--
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470

-- 
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Josh Luthman · Wed, 12 Mar 2008 12:08:32 -0400 ·
One and only bump on this =)

Is it possible to specify words or something on the server side to make the
msgs test red or yellow?  Dirk here gave me a solution for the client side
which works, but if at all possible I'd like to configure it on the server.

Josh
quoted from Josh Luthman

On 3/11/08, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
Is there an equal way to do the same thing on the server side?


On 3/11/08, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi Josh,

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to activate
a
red or yellow alert?
Of course. You have to define a match-pattern and a COLOR statement in
the LOG entry of your client configuration file. This is explained
inside the client config file localclient.cfg, if you use client side
configuration.

--
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470

--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
-- 
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Steve Holmes · Wed, 12 Mar 2008 12:37:39 -0400 ·
Josh,I think Dirk meant the hobbit-clients.cfg file on the server. In my
hobbit-clients.cfg file I have (for example):
LOG /var/adm/messages %(?-i)WARNING COLOR=yellow IGNORE="%.*fibre-chanel.*"

which says turn yellow for a warning but ignore the given string. And this
is on the server.

Is that not what you want?

Steve.

On Wed, Mar 12, 2008 at 12:08 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>
quoted from Josh Luthman
wrote:
One and only bump on this =)

Is it possible to specify words or something on the server side to make
the msgs test red or yellow?  Dirk here gave me a solution for the client
side which works, but if at all possible I'd like to configure it on the
server.

Josh


On 3/11/08, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
Is there an equal way to do the same thing on the server side?


On 3/11/08, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi Josh,

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to
activate a
red or yellow alert?
Of course. You have to define a match-pattern and a COLOR statement in
the LOG entry of your client configuration file. This is explained
inside the client config file localclient.cfg, if you use client side
configuration.

--
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470

--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Josh Luthman · Wed, 12 Mar 2008 13:08:19 -0400 ·
I must have skipped over that when I did a grep -i msgs
~hobbituser/server/etc/* to brute force the answer out of the configuration.
=P

I went on the server and made a line that says...

HOST=thismatchesbbhosts
  LOG /var/log/messages e100_watchdog COLOR=red TEXT="bond interface watch"

On the hobbit server, on the msgs test page, I have this text...

Mar 12 12:55:19 neon kernel: e100: eth0: e100_watchdog: link down
Mar 12 12:55:19 neon kernel: bonding: bond0: link status definitely
down for interface eth0, disabling it
Mar 12 12:55:19 neon kernel: bonding: bond0: making interface eth1 the
new active one.
Mar 12 12:55:23 neon kernel: e100: eth0: e100_watchdog: link up,
100Mbps, full-duplex
Mar 12 12:55:23 neon kernel: bonding: bond0: link status definitely up
for interface eth0.
Mar 12 12:55:26 neon kernel: e100: eth1: e100_watchdog: link down
Mar 12 12:55:26 neon kernel: bonding: bond0: link status definitely
down for interface eth1, disabling it
Mar 12 12:55:26 neon kernel: bonding: bond0: making interface eth0 the
new active one.
Mar 12 12:55:28 neon kernel: e100: eth1: e100_watchdog: link up,
100Mbps, full-duplex
Mar 12 12:55:28 neon kernel: bonding: bond0: link status definitely up
for interface eth1.

But it still says green.  Any idea where my mistake is?

Thanks for the help Steve!
quoted from Steve Holmes


On 3/12/08, Steve Holmes <user-ec1bf77b1b44@xymon.invalid> wrote:
Josh,I think Dirk meant the hobbit-clients.cfg file on the server. In my
hobbit-clients.cfg file I have (for example):
LOG /var/adm/messages %(?-i)WARNING COLOR=yellow
IGNORE="%.*fibre-chanel.*"

which says turn yellow for a warning but ignore the given string. And this
is on the server.

Is that not what you want?

Steve.

On Wed, Mar 12, 2008 at 12:08 PM, Josh Luthman <
user-4c45a83f15cb@xymon.invalid> wrote:
One and only bump on this =)

Is it possible to specify words or something on the server side to make
the msgs test red or yellow?  Dirk here gave me a solution for the client
side which works, but if at all possible I'd like to configure it on the
server.

Josh


On 3/11/08, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
Is there an equal way to do the same thing on the server side?


On 3/11/08, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi Josh,

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to
activate a
red or yellow alert?
Of course. You have to define a match-pattern and a COLOR statement
in
the LOG entry of your client configuration file. This is explained
inside the client config file localclient.cfg, if you use client
side
configuration.

--
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470

--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
-- 
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
list Steve Holmes · Wed, 12 Mar 2008 13:35:55 -0400 ·
It looks ok to me, but since your match string isn't a regexp, you really
don't need the "TEXT=" part. Even though the comments in the config file
says you can have it, I've never used it. In fact, I'm not sure what good it
does since the full message is displayed without it, even with a regexp for
the match string.
Also a caveat: many of us have noticed that the pattern matching for the log
files is buggy. At least in 4.2.0. Some IGNORE patterns don't ignore. I
don't remember noticing any match strings not matching, though.

Steve.


On Wed, Mar 12, 2008 at 1:08 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>
quoted from Josh Luthman
wrote:
I must have skipped over that when I did a grep -i msgs
~hobbituser/server/etc/* to brute force the answer out of the configuration.
=P

I went on the server and made a line that says...

HOST=thismatchesbbhosts
  LOG /var/log/messages e100_watchdog COLOR=red TEXT="bond interface
watch"

On the hobbit server, on the msgs test page, I have this text...

Mar 12 12:55:19 neon kernel: e100: eth0: e100_watchdog: link down

Mar 12 12:55:19 neon kernel: bonding: bond0: link status definitely down for interface eth0, disabling it
Mar 12 12:55:19 neon kernel: bonding: bond0: making interface eth1 the new active one.
Mar 12 12:55:23 neon kernel: e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex

Mar 12 12:55:23 neon kernel: bonding: bond0: link status definitely up for interface eth0.
Mar 12 12:55:26 neon kernel: e100: eth1: e100_watchdog: link down
Mar 12 12:55:26 neon kernel: bonding: bond0: link status definitely down for interface eth1, disabling it

Mar 12 12:55:26 neon kernel: bonding: bond0: making interface eth0 the new active one.
Mar 12 12:55:28 neon kernel: e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex
Mar 12 12:55:28 neon kernel: bonding: bond0: link status definitely up for interface eth1.

But it still says green.  Any idea where my mistake is?

Thanks for the help Steve!


On 3/12/08, Steve Holmes <user-ec1bf77b1b44@xymon.invalid> wrote:
Josh,I think Dirk meant the hobbit-clients.cfg file on the server. In my
hobbit-clients.cfg file I have (for example):
LOG /var/adm/messages %(?-i)WARNING COLOR=yellow
IGNORE="%.*fibre-chanel.*"

which says turn yellow for a warning but ignore the given string. And
this is on the server.

Is that not what you want?

Steve.

On Wed, Mar 12, 2008 at 12:08 PM, Josh Luthman <
user-4c45a83f15cb@xymon.invalid> wrote:
One and only bump on this =)

Is it possible to specify words or something on the server side to
make the msgs test red or yellow?  Dirk here gave me a solution for the
client side which works, but if at all possible I'd like to configure it on
the server.

Josh


On 3/11/08, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
Is there an equal way to do the same thing on the server side?


On 3/11/08, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi Josh,

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to
activate a
red or yellow alert?
Of course. You have to define a match-pattern and a COLOR
statement in
the LOG entry of your client configuration file. This is explained
inside the client config file localclient.cfg, if you use client
side
configuration.

--
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470

--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it,
poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
-- 

There is no greater gift to an insecure leader that quite matches a vague
enemy who can be used to whip up fear and hatred among the population.
-Paul Rusesabagina, humanitarian (b. 1954)

Human beings are perhaps never more frightening than when they are
convinced beyond doubt that they are right. -Laurens van der Post, explorer
and writer (1906-1996)
list Josh Luthman · Wed, 12 Mar 2008 13:47:37 -0400 ·
I just tried it with the line you saw above in the localclient.cfg on the
client - no success.

I just dropped the TEXT= argument on both the hobbit-clients.cfg on the
server and the localclient.cfg on the client.  Give it some time to update
and I'll let you know the results =)
quoted from Steve Holmes

On 3/12/08, Steve Holmes <user-ec1bf77b1b44@xymon.invalid> wrote:
It looks ok to me, but since your match string isn't a regexp, you really
don't need the "TEXT=" part. Even though the comments in the config file
says you can have it, I've never used it. In fact, I'm not sure what good it
does since the full message is displayed without it, even with a regexp for
the match string.
Also a caveat: many of us have noticed that the pattern matching for the
log files is buggy. At least in 4.2.0. Some IGNORE patterns don't ignore.
I don't remember noticing any match strings not matching, though.

Steve.


On Wed, Mar 12, 2008 at 1:08 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>
wrote:
I must have skipped over that when I did a grep -i msgs
~hobbituser/server/etc/* to brute force the answer out of the configuration.
=P

I went on the server and made a line that says...

HOST=thismatchesbbhosts
  LOG /var/log/messages e100_watchdog COLOR=red TEXT="bond interface
watch"

On the hobbit server, on the msgs test page, I have this text...

Mar 12 12:55:19 neon kernel: e100: eth0: e100_watchdog: link down


Mar 12 12:55:19 neon kernel: bonding: bond0: link status definitely down for interface eth0, disabling it
Mar 12 12:55:19 neon kernel: bonding: bond0: making interface eth1 the new active one.
Mar 12 12:55:23 neon kernel: e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex


Mar 12 12:55:23 neon kernel: bonding: bond0: link status definitely up for interface eth0.
Mar 12 12:55:26 neon kernel: e100: eth1: e100_watchdog: link down
Mar 12 12:55:26 neon kernel: bonding: bond0: link status definitely down for interface eth1, disabling it


Mar 12 12:55:26 neon kernel: bonding: bond0: making interface eth0 the new active one.
Mar 12 12:55:28 neon kernel: e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex
Mar 12 12:55:28 neon kernel: bonding: bond0: link status definitely up for interface eth1.

But it still says green.  Any idea where my mistake is?

Thanks for the help Steve!


On 3/12/08, Steve Holmes <user-ec1bf77b1b44@xymon.invalid> wrote:
Josh,I think Dirk meant the hobbit-clients.cfg file on the server. In
my hobbit-clients.cfg file I have (for example):
LOG /var/adm/messages %(?-i)WARNING COLOR=yellow
IGNORE="%.*fibre-chanel.*"

which says turn yellow for a warning but ignore the given string. And
this is on the server.

Is that not what you want?

Steve.

On Wed, Mar 12, 2008 at 12:08 PM, Josh Luthman <
user-4c45a83f15cb@xymon.invalid> wrote:
One and only bump on this =)

Is it possible to specify words or something on the server side to
make the msgs test red or yellow?  Dirk here gave me a solution for the
client side which works, but if at all possible I'd like to configure it on
the server.

Josh


On 3/11/08, Josh Luthman <user-4c45a83f15cb@xymon.invalid> wrote:
Is there an equal way to do the same thing on the server side?


On 3/11/08, Dirk Kastens <user-e4253f8fc63b@xymon.invalid> wrote:
Hi Josh,

Josh Luthman schrieb:
Is it possible for me to define lines that appear in msgs to
activate a
red or yellow alert?
Of course. You have to define a match-pattern and a COLOR
statement in
the LOG entry of your client configuration file. This is
explained
inside the client config file localclient.cfg, if you use client
side
configuration.

--
Regards,

Dirk Kastens
Universitaet Osnabrueck, Rechenzentrum (Computer Center)
Albrechtstr. 28, 49069 Osnabrueck, Germany
Tel.: +XX-XXX-XXX-XXXX, FAX: -2470

--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it,
poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it,
poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
--
There is no greater gift to an insecure leader that quite matches a vague
enemy who can be used to whip up fear and hatred among the population.
-Paul Rusesabagina, humanitarian (b. 1954)

Human beings are perhaps never more frightening than when they are
convinced beyond doubt that they are right. -Laurens van der Post,
explorer
and writer (1906-1996)
-- 
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer