Xymon Mailing List Archive search

EXHOST regular expression syntax

5 messages in this thread

list Anna Jonna Armannsdottir · Tue, 22 Apr 2008 08:15:00 +0000 ·
In my University, all hosts on a page run a dsmc process. However, there are exceptions from the rule. In the hobbit-clients.cfg file, The rule that used to work is like this: PROC	dsmc EXHOST=%.jotunn.rhi.hi.is

Now, yet another host is also exempt from the rule, so I tested the following rules:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is EXHOST=bestla.rhi.hi.is
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is,bestla.rhi.hi.is

Both rules give unexpected results. So I expect that the rule should be written as a single regular expression, but I do not know the syntax. Can anybody refer me to a description of the syntax. 
-- 
Kindest Regards, Anna Jonna Ármannsdóttir,       %&   A: Because people read from top to bottom.
Unix System Aministration, Computing Services,   %&   Q: Why is top posting bad?
University of Iceland.
list Johann Eggers · Tue, 22 Apr 2008 10:25:09 +0200 ·
quoted from Anna Jonna Armannsdottir
The rule that used to work is like this:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is

Now, yet another host is also exempt from the rule, so
I tested the following rules:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is EXHOST=bestla.rhi.hi.is
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is,bestla.rhi.hi.is

Both rules give unexpected results. So I expect that the rule
should be written as a single regular expression, but I
do not know the syntax. Can anybody refer me to a description
of the syntax.
Hi,

Try using this:

PROC dsmc EXHOST=%(jotunn.rhi.hi.is|bestla.rhi.hi.is)

-Johann
list Benoit List · Tue, 22 Apr 2008 10:55:10 +0200 ·
Regular expression syntax Hobbit


###################################
#        +      Add
#        -      Subtract
#        *      Multiply
#        /      Divide
#        %      Modulo
#        |      Bit-wise "or"
#        &      Bit-wise "and"
#        ||     Logical "or"
#        &&     Logical "and"
#        >      Greater than
#        <      Less than
#        >=     Greater than or equal
#        <=     Less than or equal
#        ==     Equal
###################################


http://hobbitmon.sourceforge.net/docs/man5/bbcombotest.cfg.5.html

2008/4/22, Johann Eggers <user-769b09132207@xymon.invalid>:
quoted from Johann Eggers
The rule that used to work is like this:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is

Now, yet another host is also exempt from the rule, so
I tested the following rules:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is EXHOST=bestla.rhi.hi.is
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is,bestla.rhi.hi.is

Both rules give unexpected results. So I expect that the rule
should be written as a single regular expression, but I
do not know the syntax. Can anybody refer me to a description
of the syntax.
Hi,

Try using this:

PROC dsmc EXHOST=%(jotunn.rhi.hi.is|bestla.rhi.hi.is)

-Johann

-- 
                            .''`.

<mailinglist.benoit : :' : gmail.com>
                            `. `'
                              `-
list Johann Eggers · Tue, 22 Apr 2008 11:01:48 +0200 ·
Sorry,

But I don't know what the bbcombotest.cfg operators have to do with the
regular expressions hobbit uses in hobbit-clients.cfg...

I use the example I posted in my hobbit-clients.cfg to exclude some
specific hosts from a common rule; and it's working.

-Johann
quoted from Benoit List

 
Regular expression syntax Hobbit


###################################
#        +      Add
#        -      Subtract
#        *      Multiply
#        /      Divide
#        %      Modulo
#        |      Bit-wise "or"
#        &      Bit-wise "and"
#        ||     Logical "or"
#        &&     Logical "and"
#        >      Greater than
#        <      Less than
#        >=     Greater than or equal
#        <=     Less than or equal
#        ==     Equal
###################################


http://hobbitmon.sourceforge.net/docs/man5/bbcombotest.cfg.5.html

2008/4/22, Johann Eggers <user-769b09132207@xymon.invalid>:
The rule that used to work is like this:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is

Now, yet another host is also exempt from the rule, so
I tested the following rules:
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is EXHOST=bestla.rhi.hi.is
PROC	dsmc EXHOST=%.jotunn.rhi.hi.is,bestla.rhi.hi.is

Both rules give unexpected results. So I expect that the rule
should be written as a single regular expression, but I
do not know the syntax. Can anybody refer me to a description
of the syntax.
Hi,

Try using this:

PROC dsmc EXHOST=%(jotunn.rhi.hi.is|bestla.rhi.hi.is)

-Johann

--
                            .''`.
<mailinglist.benoit : :' : gmail.com>
                            `. `'
                              `-

list Anna Jonna Armannsdottir · Tue, 22 Apr 2008 09:48:55 +0000 ·
On þri, 2008-04-22 at 10:25 +0200, Johann Eggers wrote:
Try using this:

PROC dsmc EXHOST=%(jotunn.rhi.hi.is|bestla.rhi.hi.is)

-Johann
Amazing! It works! :) I really do not understand this magic, but in fact the host jotunn.rhi.hi.is has a dsmc process running, but not the 42 hosts that are *.jotunn.rhi.hi.is and neither bestla.rhi.hi.is. 
Thank You wery much. :)   
-- 
Kær kveðja, Anna Jonna Ármannsdóttir,   %&   A: Because people read from top to bottom.
Unix Kerfisstjórn, Reiknistofnun HÍ   %&   Q: Why is top posting bad?