Xymon Mailing List Archive search

directory test

14 messages in this thread

list dOCtoR MADneSs · Wed, 25 Feb 2009 14:29:28 +0100 ·
Hi,

I'm using actually xymon 4.2.3. I check for presence of some files (red if present, else green ), and it's working very well.
I'd like to do almost same test with directory. Final objective is :
if there is any directory called toto_ANYTHING in /tata (to any level in the directory hierarchy of /tata, I'd like yellow result, else green result).

I tried to use :
[host]
dir:/tata/*/toto_*
in my client-local.cfg
and
HOST=host
DIR /tata/*/toto_* yellow NOEXIST
in my hobbit-clients.cfg

 But I get errors (Could not determine size of directory /tata/*/toto_ANYTHING)
Do I need to write my own test, or is there an included test that could do what I described ?

Tks for any help
list Henrik Størner · Thu, 26 Feb 2009 11:59:33 +0100 ·
quoted from dOCtoR MADneSs
On Wed, Feb 25, 2009 at 02:29:28PM +0100, dOCtoR MADneSs wrote:
I'm using actually xymon 4.2.3. I check for presence of some files (red  if present, else green ), and it's working very well.
I'd like to do almost same test with directory. Final objective is :
if there is any directory called toto_ANYTHING in /tata (to any level in  the directory hierarchy of /tata, I'd like yellow result, else green  result).
Not sure if it will work, but I'd start with something like
  [host]
  file:`find /tata -name toto_*`
That gives you a list of the files you're looking for. And then
in hobbit-clients.cfg you would have

  HOST=host
      FILE %^/tata/toto_ yellow noexist


Regards,
Henrik
list dOCtoR MADneSs · Thu, 26 Feb 2009 14:18:06 +0100 ·
quoted from Henrik Størner
Henrik Størner a écrit :
On Wed, Feb 25, 2009 at 02:29:28PM +0100, dOCtoR MADneSs wrote:
I'm using actually xymon 4.2.3. I check for presence of some files (red  if present, else green ), and it's working very well.
I'd like to do almost same test with directory. Final objective is :
if there is any directory called toto_ANYTHING in /tata (to any level in  the directory hierarchy of /tata, I'd like yellow result, else green  result).
Not sure if it will work, but I'd start with something like
  [host]
  file:`find /tata -name toto_*`
That gives you a list of the files you're looking for. And then
in hobbit-clients.cfg you would have

  HOST=host
      FILE %^/tata/toto_ yellow noexist


Regards,
Henrik

Thanks for your answer, unfortunately this didn't work.
If I replace
file:`find /tata -name toto_*` with
with
file:$(find /tata -name toto_*) I can get :

green $(find /tata -type d -name toto_*)
But it's wrong, I have a toto_test directory in /tata

So, I don't think it's the appropriate solution
list dOCtoR MADneSs · Thu, 26 Feb 2009 14:22:50 +0100 ·
Hi,

I get all messages twice, is it a normal behaviour ?
list D. - Gdi/snb Kip · Thu, 26 Feb 2009 17:29:20 +0100 ·
Your find is looking for the existence of the directory, not the non-existence.
So the green status is correct.

Change it to an 'if' statement like 
if [ $(find /tata -d -name toto_*) ]; then echo &red ; else echo &green ; fi

Or something similar

Alternatively, you can look into the correct useage of the '!'-operator (boolean NOT) in your 'find' expression.
I could not find the correct way to use it quick enough, sorry.
quoted from dOCtoR MADneSs


-----Oorspronkelijk bericht-----
Van: dOCtoR MADneSs [mailto:user-d54077869176@xymon.invalid] Verzonden: donderdag 26 februari 2009 14:18
Aan: user-ae9b8668bcde@xymon.invalid
Onderwerp: Re: [hobbit] directory test

Henrik Størner a écrit :
On Wed, Feb 25, 2009 at 02:29:28PM +0100, dOCtoR MADneSs wrote:
I'm using actually xymon 4.2.3. I check for presence of some files (red if present, else green ), and it's working very well.
I'd like to do almost same test with directory. Final objective is :
if there is any directory called toto_ANYTHING in /tata (to any level in the directory hierarchy of /tata, I'd like yellow result, else green result).
Not sure if it will work, but I'd start with something like
  [host]
  file:`find /tata -name toto_*`
That gives you a list of the files you're looking for. And then in hobbit-clients.cfg you would have

  HOST=host
      FILE %^/tata/toto_ yellow noexist


Regards,
Henrik

Thanks for your answer, unfortunately this didn't work.
If I replace
file:`find /tata -name toto_*` with
with
file:$(find /tata -name toto_*) I can get :

green $(find /tata -type d -name toto_*) But it's wrong, I have a toto_test directory in /tata

So, I don't think it's the appropriate solution
list Galen Johnson · Thu, 26 Feb 2009 11:45:58 -0500 ·
If you want to check that a directory doesn't exist, why not use Xymon's builtin functionality?
quoted from D. - Gdi/snb Kip

-----Original Message-----
From: Kip, D. - GDI/SNB [mailto:user-a81387f605a8@xymon.invalid] Sent: Thursday, February 26, 2009 11:29 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] directory test

Your find is looking for the existence of the directory, not the non-existence.
So the green status is correct.

Change it to an 'if' statement like 
if [ $(find /tata -d -name toto_*) ]; then echo &red ; else echo &green ; fi

Or something similar

Alternatively, you can look into the correct useage of the '!'-operator (boolean NOT) in your 'find' expression.
I could not find the correct way to use it quick enough, sorry.


-----Oorspronkelijk bericht-----
Van: dOCtoR MADneSs [mailto:user-d54077869176@xymon.invalid] Verzonden: donderdag 26 februari 2009 14:18
Aan: user-ae9b8668bcde@xymon.invalid
Onderwerp: Re: [hobbit] directory test

Henrik Størner a écrit :
On Wed, Feb 25, 2009 at 02:29:28PM +0100, dOCtoR MADneSs wrote:
I'm using actually xymon 4.2.3. I check for presence of some files (red if present, else green ), and it's working very well.
I'd like to do almost same test with directory. Final objective is :
if there is any directory called toto_ANYTHING in /tata (to any level in the directory hierarchy of /tata, I'd like yellow result, else green result).
Not sure if it will work, but I'd start with something like
  [host]
  file:`find /tata -name toto_*`
That gives you a list of the files you're looking for. And then in hobbit-clients.cfg you would have

  HOST=host
      FILE %^/tata/toto_ yellow noexist


Regards,
Henrik

Thanks for your answer, unfortunately this didn't work.
If I replace
file:`find /tata -name toto_*` with
with
file:$(find /tata -name toto_*) I can get :

green $(find /tata -type d -name toto_*) But it's wrong, I have a toto_test directory in /tata

So, I don't think it's the appropriate solution
list Henrik Størner · Thu, 26 Feb 2009 18:08:37 +0100 ·
On Thu, Feb 26, 2009 at 02:22:50PM +0100, dOCtoR MADneSs wrote:
I get all messages twice, is it a normal behaviour ?
No.

And my mailserver log only shows each message delivered to your address
once.


Regards,
Henrik
list dOCtoR MADneSs · Thu, 26 Feb 2009 18:27:13 +0100 ·
quoted from Galen JohnsonGalen Johnson a écrit :
If you want to check that a directory doesn't exist, why not use Xymon's builtin functionality?



-----Original Message-----

From: Kip, D. - GDI/SNB [mailto:user-a81387f605a8@xymon.invalid] 

Sent: Thursday, February 26, 2009 11:29 AM

To: user-ae9b8668bcde@xymon.invalid

Subject: RE: [hobbit] directory test



Your find is looking for the existence of the directory, not the non-existence.

So the green status is correct.



Change it to an 'if' statement like 



if [ $(find /tata -d -name toto_*) ]; then echo &red ; else echo &green ; fi



Or something similar



Alternatively, you can look into the correct useage of the '!'-operator (boolean NOT) in your 'find' expression.

I could not find the correct way to use it quick enough, sorry.





-----Oorspronkelijk bericht-----

Van: dOCtoR MADneSs [mailto:user-d54077869176@xymon.invalid] 

Verzonden: donderdag 26 februari 2009 14:18

Aan: user-ae9b8668bcde@xymon.invalid

Onderwerp: Re: [hobbit] directory test



Henrik Størner a écrit :

  
On Wed, Feb 25, 2009 at 02:29:28PM +0100, dOCtoR MADneSs wrote:

    
I'm using actually xymon 4.2.3. I check for presence of some files 

(red if present, else green ), and it's working very well.

I'd like to do almost same test with directory. Final objective is :

if there is any directory called toto_ANYTHING in /tata (to any level 

in the directory hierarchy of /tata, I'd like yellow result, else 

green result).

      
Not sure if it will work, but I'd start with something like

  [host]

  file:`find /tata -name toto_*`

That gives you a list of the files you're looking for. And then in 

hobbit-clients.cfg you would have



  HOST=host

      FILE %^/tata/toto_ yellow noexist





Regards,

Henrik











    
Thanks for your answer, unfortunately this didn't work.

If I replace

file:`find /tata -name toto_*` with

with

file:$(find /tata -name toto_*) I can get :



green $(find /tata -type d -name toto_*) But it's wrong, I have a toto_test directory in /tata



So, I don't think it's the appropriate solution































  
That's I want to do. I'd like to check the existence of a directory, and get yellow status if the directory exists. The difficulty is that the directory name is variable, it begins with toto_ and is followed by a random value.
So my first question was :
How to use the "files" test to check it.
list dOCtoR MADneSs · Thu, 26 Feb 2009 18:27:59 +0100 ·
quoted from dOCtoR MADneSsKip, D. - GDI/SNB a écrit :
Your find is looking for the existence of the directory, not the non-existence.

So the green status is correct.



Change it to an 'if' statement like 



if [ $(find /tata -d -name toto_*) ]; then echo &red ; else echo &green ; fi



Or something similar



Alternatively, you can look into the correct useage of the '!'-operator (boolean NOT) in your 'find' expression.

I could not find the correct way to use it quick enough, sorry.





-----Oorspronkelijk bericht-----

Van: dOCtoR MADneSs [mailto:user-d54077869176@xymon.invalid] 

Verzonden: donderdag 26 februari 2009 14:18

Aan: user-ae9b8668bcde@xymon.invalid

Onderwerp: Re: [hobbit] directory test



Henrik Størner a écrit :

  
On Wed, Feb 25, 2009 at 02:29:28PM +0100, dOCtoR MADneSs wrote:

    
I'm using actually xymon 4.2.3. I check for presence of some files 

(red if present, else green ), and it's working very well.

I'd like to do almost same test with directory. Final objective is :

if there is any directory called toto_ANYTHING in /tata (to any level 

in the directory hierarchy of /tata, I'd like yellow result, else 

green result).

      
Not sure if it will work, but I'd start with something like

  [host]

  file:`find /tata -name toto_*`

That gives you a list of the files you're looking for. And then in 

hobbit-clients.cfg you would have



  HOST=host

      FILE %^/tata/toto_ yellow noexist





Regards,

Henrik











    
Thanks for your answer, unfortunately this didn't work.

If I replace

file:`find /tata -name toto_*` with

with

file:$(find /tata -name toto_*) I can get :



green $(find /tata -type d -name toto_*) But it's wrong, I have a toto_test directory in /tata



So, I don't think it's the appropriate solution





















  
1st, I want to use "files" test if possible. Thanks for your command line, it's what i'm ready to use if I can't find how to use integrated "files" test.
list dOCtoR MADneSs · Thu, 26 Feb 2009 18:28:24 +0100 ·
quoted from Henrik StørnerHenrik Størner a écrit :
On Thu, Feb 26, 2009 at 02:22:50PM +0100, dOCtoR MADneSs wrote:

  
I get all messages twice, is it a normal behaviour ?

    

No.



And my mailserver log only shows each message delivered to your address

once.





Regards,

Henrik











  
So the problem should be on my mail server... :)
tks
list Stephen Couch · Sun, 25 Jul 2010 15:15:03 -0700 ·
subscribe 		 	   		  
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
list Josh Luthman · Sun, 25 Jul 2010 18:21:12 -0400 ·
I think it's xymon-subscribe at xymon.com

On Jul 25, 2010 6:16 PM, "Stephen Couch" <user-e1aca396b3fc@xymon.invalid> wrote:

 subscribe
The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get
started.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3>;
list Neil Simmonds · Fri, 18 Mar 2022 13:20:54 +0000 ·
I am currently signed up to the mailing lists with a gmail address which my
company have now blocked. I?m trying to sign up with my work address but
when I click ?subscribe? on
it goes to https://lists.xymon.com/mailman/subscribe/xymon which gives a
404 error.


I also can't change my Email through the online form as that also fails and
if I email the user-3d35b50322b3@xymon.invalid email address listed I get an
undeliverable.


Does anyone know how I can change my registered email address?
list John Horne · Fri, 18 Mar 2022 14:52:38 +0000 ·
quoted from Neil Simmonds
On Fri, 2022-03-18 at 13:20 +0000, Neil Simmonds wrote:
I am currently signed up to the mailing lists with a gmail address which my
company have now blocked. I?m trying to sign up with my work address but when

I click ?subscribe? on goes
to https://lists.xymon.com/mailman/subscribe/xymonwhich gives a 404 error.
quoted from Neil Simmonds

I also can't change my Email through the online form as that also fails and
if I email the user-3d35b50322b3@xymon.invalid email address listed I get an
undeliverable.

Does anyone know how I can change my registered email address?
Hi,

From the listinfo page, perhaps use the 'xymon-owner' email address at the
bottom? I'm sure they would want to know about the 404 as well.


John.

--
John Horne | Senior Operations Analyst | Technology and Information Services
University of Plymouth | Drake Circus | Plymouth | Devon | PL4 8AA | UK
[http://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>;

This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.