Xymon Mailing List Archive search

Regular Expression problem

5 messages in this thread

list Robert Manocchia · Thu, 13 Mar 2008 09:47:50 -0400 ·
            I have the following scenario. I want to monitor the
creation of core files in the following directories
/usr/sap/PRD/D01/work, /usr/sap/PRD/D02/work, usr/sap/PRD/D03/work,
/usr/sap/PRD/D04/work, /usr/sap/PRD/D05/work, and /usr/sap/PRD/D06/work.

 
            I have the following:

 
1.       In client-local.cfg: [server1]

                                    File:`ls -1d
/usr/sap/PRD/D0*/work/core`

 
2.       In hobbit-clients.cfg: FILE %/usr/sap/PRD/D0.*/work/core
NOEXIST yellow

 
3.       And in hobbit-alerts.cfg: MAIL user-e4d0b0f5a288@xymon.invalid COLOR=yellow
RECOVERED

 
            This is not working. When click on the files for this server
I do not see these files being selected.

 
            Any help would be appreciated.
list Steve Holmes · Thu, 13 Mar 2008 10:29:09 -0400 ·
Robert,
Do the files show up in the client data listing on the server?
You might need to put the match string in the FILE statement in
hobbit-clients.cfg in double quotes.

Steve.

On Thu, Mar 13, 2008 at 9:47 AM, Manocchia, Robert <
quoted from Robert Manocchia
user-615a9b935f98@xymon.invalid> wrote:
             I have the following scenario. I want to monitor the creation
of core files in the following directories /usr/sap/PRD/D01/work,
/usr/sap/PRD/D02/work, usr/sap/PRD/D03/work, /usr/sap/PRD/D04/work,
/usr/sap/PRD/D05/work, and /usr/sap/PRD/D06/work.


            I have the following:


1.       In client-local.cfg: [server1]

                                    File:`ls -1d /usr/sap/PRD
/D0*/work/core`
quoted from Robert Manocchia


2.       In hobbit-clients.cfg: FILE %/usr/sap/PRD/D0.*/work/core NOEXIST
yellow


3.       And in hobbit-alerts.cfg: MAIL user-e4d0b0f5a288@xymon.invalid COLOR=yellow
RECOVERED


            This is not working. When click on the files for this server I
do not see these files being selected.


            Any help would be appreciated.
-- 

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 Robert Manocchia · Thu, 13 Mar 2008 12:48:40 -0400 ·
     The files do not show up in the client data listing on the server

 
            I tried the following in local-clients.cfg: file:`ls -1d
/usr/sap/PRD/D01/work/core` and it worked. It just doesn't like the D0*
expression.

 
            Here is the cut and paste for each

 
            local-clients.cfg: file:`ls -1d /usr/sap/PRD/D01/work/core`

            hobbit-clients.cfg: FILE "%/usr/sap/PRD/D0.*/work/core"
NOEXIST yellow

 
-----Original Message-----
From: user-5425c7b245e1@xymon.invalid [mailto:user-5425c7b245e1@xymon.invalid] On Behalf Of
Steve Holmes
Sent: Thursday, March 13, 2008 10:29 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Regular Expression problem
quoted from Steve Holmes

 
Robert, 

 
Do the files show up in the client data listing on the server?

You might need to put the match string in the FILE statement in
hobbit-clients.cfg in double quotes. 

 
Steve.

On Thu, Mar 13, 2008 at 9:47 AM, Manocchia, Robert
<user-615a9b935f98@xymon.invalid> wrote:

            I have the following scenario. I want to monitor the
creation of core files in the following directories
/usr/sap/PRD/D01/work, /usr/sap/PRD/D02/work, usr/sap/PRD/D03/work,
/usr/sap/PRD/D04/work, /usr/sap/PRD/D05/work, and /usr/sap/PRD/D06/work.

 
            I have the following:

 
1.       In client-local.cfg: [server1]

                                    File:`ls -1d
/usr/sap/PRD/D0*/work/core`

 
2.       In hobbit-clients.cfg: FILE %/usr/sap/PRD/D0.*/work/core
NOEXIST yellow

 
3.       And in hobbit-alerts.cfg: MAIL user-e4d0b0f5a288@xymon.invalid COLOR=yellow
RECOVERED

 
            This is not working. When click on the files for this server
I do not see these files being selected.

 
            Any help would be appreciated.


-- 
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 Steve Holmes · Fri, 14 Mar 2008 14:35:06 -0400 ·
I think the problem is that the file list produced by the ls in the back
ticks is showing up as a list all on one line rather than a list of files
one per line. Not absolutely sure about that, but if you do an echo `ls -1d
./someregexp` it produces one line of output. It might work to actually
write a script to make sure the output has newlines between the  file names
and then run that in the hobbit config instead of the ls.
Beyond that I have no idea.

Steve.


On Thu, Mar 13, 2008 at 12:48 PM, Manocchia, Robert <
quoted from Robert Manocchia
user-615a9b935f98@xymon.invalid> wrote:
      The files do not show up in the client data listing on the server


            I tried the following in local-clients.cfg: file:`ls -1d
/usr/sap/PRD/D01/work/core` and it worked. It just doesn't like the D0*
expression.


            Here is the cut and paste for each


            local-clients.cfg: file:`ls -1d /usr/sap/PRD/D01/work/core`

            hobbit-clients.cfg: FILE "%/usr/sap/PRD/D0.*/work/core"
NOEXIST yellow


-----Original Message-----
*From:* user-5425c7b245e1@xymon.invalid [mailto:user-5425c7b245e1@xymon.invalid] *On Behalf Of *Steve
Holmes
*Sent:* Thursday, March 13, 2008 10:29 AM
*To:* user-ae9b8668bcde@xymon.invalid
*Subject:* Re: [hobbit] Regular Expression problem


Robert,


Do the files show up in the client data listing on the server?

You might need to put the match string in the FILE statement in
hobbit-clients.cfg in double quotes.


Steve.

On Thu, Mar 13, 2008 at 9:47 AM, Manocchia, Robert <
user-615a9b935f98@xymon.invalid> wrote:

            I have the following scenario. I want to monitor the creation
of core files in the following directories /usr/sap/PRD/D01/work,
/usr/sap/PRD/D02/work, usr/sap/PRD/D03/work, /usr/sap/PRD/D04/work,
/usr/sap/PRD/D05/work, and /usr/sap/PRD/D06/work.


            I have the following:


1.       In client-local.cfg: [server1]

                                    File:`ls -1d
/usr/sap/PRD/D0*/work/core`


2.       In hobbit-clients.cfg: FILE %/usr/sap/PRD/D0.*/work/core NOEXIST
yellow


3.       And in hobbit-alerts.cfg: MAIL user-e4d0b0f5a288@xymon.invalid COLOR=yellow
RECOVERED


            This is not working. When click on the files for this server I
do not see these files being selected.


            Any help would be appreciated.


--
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)
-- 
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 Robert Manocchia · Fri, 14 Mar 2008 15:10:56 -0400 ·
Thanks. Since there are only 6 separate directories to check I listed
them all individually in the client-local.cfg file. The wildcards work
fine in the hobbit-clients.cfg file. Thanks again.

 
-----Original Message-----
From: user-5425c7b245e1@xymon.invalid [mailto:user-5425c7b245e1@xymon.invalid] On Behalf Of
Steve Holmes
Sent: Friday, March 14, 2008 2:35 PM
quoted from Steve Holmes
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Regular Expression problem

 
I think the problem is that the file list produced by the ls in the back
ticks is showing up as a list all on one line rather than a list of
files one per line. Not absolutely sure about that, but if you do an
echo `ls -1d ./someregexp` it produces one line of output. It might work
to actually write a script to make sure the output has newlines between
the  file names and then run that in the hobbit config instead of the
ls. 

 
Beyond that I have no idea.

 
Steve.

 
On Thu, Mar 13, 2008 at 12:48 PM, Manocchia, Robert
<user-615a9b935f98@xymon.invalid> wrote:

     The files do not show up in the client data listing on the server

 
            I tried the following in local-clients.cfg: file:`ls -1d
/usr/sap/PRD/D01/work/core` and it worked. It just doesn't like the D0*
expression.

 
            Here is the cut and paste for each

 
            local-clients.cfg: file:`ls -1d /usr/sap/PRD/D01/work/core`

            hobbit-clients.cfg: FILE "%/usr/sap/PRD/D0.*/work/core"
NOEXIST yellow

 
-----Original Message-----
From: user-5425c7b245e1@xymon.invalid [mailto:user-5425c7b245e1@xymon.invalid] On Behalf Of
Steve Holmes
Sent: Thursday, March 13, 2008 10:29 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Regular Expression problem

 
Robert, 

 
Do the files show up in the client data listing on the server?

You might need to put the match string in the FILE statement in
hobbit-clients.cfg in double quotes. 

 
Steve.

On Thu, Mar 13, 2008 at 9:47 AM, Manocchia, Robert
<user-615a9b935f98@xymon.invalid> wrote:

            I have the following scenario. I want to monitor the
creation of core files in the following directories
/usr/sap/PRD/D01/work, /usr/sap/PRD/D02/work, usr/sap/PRD/D03/work,
/usr/sap/PRD/D04/work, /usr/sap/PRD/D05/work, and /usr/sap/PRD/D06/work.

 
            I have the following:

 
1.       In client-local.cfg: [server1]

                                    File:`ls -1d
/usr/sap/PRD/D0*/work/core`

 
2.       In hobbit-clients.cfg: FILE %/usr/sap/PRD/D0.*/work/core
NOEXIST yellow

 
3.       And in hobbit-alerts.cfg: MAIL user-e4d0b0f5a288@xymon.invalid COLOR=yellow
RECOVERED

 
            This is not working. When click on the files for this server
I do not see these files being selected.

 
            Any help would be appreciated.


-- 
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) 


-- 
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)