to test the non-existence of a dir
Hi,
Xymon allow me to test the non existence of file or directory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example :
I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red
So, is there a "normal" way to use "files" test included in xymon ?
Regards, Damien
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org>wrote:
Hi,
Xymon allow me to test the non existence of file or directory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example :
I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red
So, is there a "normal" way to use "files" test included in xymon ?
Regards, Damien
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Josh Luthman a écrit :
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote:
Hi, Xymon allow me to test the non existence of file or directory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example : I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red So, is there a "normal" way to use "files" test included in xymon ? Regards, Damien To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk>
A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
Hi,
hm, first was comes in mind (not tested):
- use a find command in client-local.cfg, like 'find / -name "*_FIXED_PART_1*" |'
- use a regex along with noexist in hobbit-clients.cfg, like: FILE %.*_FIXED_PART_1.* red noexist
That should do the trick...
hh
dOCtoR MADneSs schrieb:
Josh Luthman a écrit :
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote:
Hi, Xymon allow me to test the non existence of file or directory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example : I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red So, is there a "normal" way to use "files" test included in xymon ? Regards, Damien To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk>A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Hi all,
I'd like to use iostat for performance monitoring, and include its output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is no longer valid. Any ideas where I can get it?
Thanks,
Harald
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Hi, Harald !
http://www.docum.org/foswiki/bin/view/Xymon/LinuxIostatGraphs
Cheers, martin
On Tue, 31 Mar 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is no longer valid. Any ideas where I can get it?
Thanks,
Harald
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Hi Martin,
thanks for the link (and thanks to the programmer of linux-iostat), I've installed it (with some additions/changes, see below) as described, and it works and shows what I need, :-). I attach my version of the script to this mail, since I made some edits:
- Added my "preamble" which I use in every extension script:
===============/snip/====================== my $TEST = "iostat"; (...) my $HOST = $ENV{"MACHINE"}; $HOST =~ s/(.*),.*,.*$/$1/; if (system("$ENV{'BBHOME'}/bin/bbhostgrep $TEST | grep $HOST > /dev/null 2>&1") != 0) { print "Not running on $HOST..." if $debug; exit 0; } ==============/snap/========================
With this, I can have the same scripts and config files on all systems (helps to keep things up2date), and just add the appr. entry (in this case, iostat) to the host part in bb-hosts ti run the script on a particular host.
- Cleaned up the regex a bit
- As we're using drbd (DistributedRemoteBlockDevice, often used with Linux-HA), I added "drbd" to the devices list.
Maybe someone can use my version, or get some ideas from it.
hh
Martin Flemming schrieb:
Hi, Harald !
http://www.docum.org/foswiki/bin/view/Xymon/LinuxIostatGraphs
Cheers, martin
On Tue, 31 Mar 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is no longer valid. Any ideas where I can get it?
Thanks,
Harald
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Hi, Harald !
thanks for the hint with drdb !
Hmm, .. but dont't understand your "preamble", if i use your script, it seem's that the script think, that it's serverside-script ... ;-)
[it-hobbit2] /usr/lib/hobbit/client # bin/bbcmd ext/new_linux-iostat.pl 2009-04-06 23:56:55 Using default environment file /usr/lib/hobbit/client/etc/hobbitclient.cfg 2009-04-06 23:56:55 Cannot load bb-hosts, or file is empty Not running on it-hobbit2...
[it-hobbit2] /usr/lib/hobbit/client #
.. but it isn't one ...
What's is missing in my enviroment ?
thanks & cheers,
martin
On Thu, 2 Apr 2009, Husemann, Harald wrote:
Hi Martin,
thanks for the link (and thanks to the programmer of linux-iostat), I've installed it (with some additions/changes, see below) as described, and it works and shows what I need, :-). I attach my version of the script to this mail, since I made some edits:
- Added my "preamble" which I use in every extension script:
===============/snip/====================== my $TEST = "iostat"; (...) my $HOST = $ENV{"MACHINE"}; $HOST =~ s/(.*),.*,.*$/$1/; if (system("$ENV{'BBHOME'}/bin/bbhostgrep $TEST | grep $HOST > /dev/null 2>&1") != 0) { print "Not running on $HOST..." if $debug; exit 0; } ==============/snap/========================
With this, I can have the same scripts and config files on all systems (helps to keep things up2date), and just add the appr. entry (in this case, iostat) to the host part in bb-hosts ti run the script on a particular host.
- Cleaned up the regex a bit
- As we're using drbd (DistributedRemoteBlockDevice, often used with Linux-HA), I added "drbd" to the devices list.
Maybe someone can use my version, or get some ideas from it.
hh
Martin Flemming schrieb:
Hi, Harald !
http://www.docum.org/foswiki/bin/view/Xymon/LinuxIostatGraphs
Cheers, martin
On Tue, 31 Mar 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is no longer valid. Any ideas where I can get it?
Thanks,
Harald
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Gruss
Martin Flemming
Martin Flemming DESY / IT office : Building 2b / 008a Notkestr. 85 phone : 040 - 8998 - 4667 22603 Hamburg mail : martin.flemming at desy.de
Hi Martin,
in our setup, we have a complete copy of the bb-hosts file on all clients in $BBCLIENTHOME/etc, which we use to control which external client script should run on which client. We have pre-compiled clients for all systems on the Hobbit server, including all config files, which are stored as tarballs. When I'm setting up a new client, I just add the appr. lines in the server's bb-hosts file, copy the new bb-hosts to the tarballs (we're planning to use something like rcsvi in the future to automate this step), and then execute a script on the server which uses scp and ssh to contact the new client, copy the tarball, untar it and start the client. Hope this sheds some light on the preamble, :-).
hh
Martin Flemming schrieb:
Hi, Harald !
thanks for the hint with drdb !
Hmm, .. but dont't understand your "preamble", if i use your script, it seem's that the script think, that it's serverside-script ... ;-)
[it-hobbit2] /usr/lib/hobbit/client # bin/bbcmd ext/new_linux-iostat.pl 2009-04-06 23:56:55 Using default environment file /usr/lib/hobbit/client/etc/hobbitclient.cfg 2009-04-06 23:56:55 Cannot load bb-hosts, or file is empty Not running on it-hobbit2...
[it-hobbit2] /usr/lib/hobbit/client #
.. but it isn't one ...
What's is missing in my enviroment ?
thanks & cheers,
martinOn Thu, 2 Apr 2009, Husemann, Harald wrote:
Hi Martin,
thanks for the link (and thanks to the programmer of linux-iostat), I've installed it (with some additions/changes, see below) as described, and it works and shows what I need, :-). I attach my version of the script to this mail, since I made some edits:
- Added my "preamble" which I use in every extension script:
===============/snip/====================== my $TEST = "iostat"; (...) my $HOST = $ENV{"MACHINE"}; $HOST =~ s/(.*),.*,.*$/$1/; if (system("$ENV{'BBHOME'}/bin/bbhostgrep $TEST | grep $HOST > /dev/null 2>&1") != 0) { print "Not running on $HOST..." if $debug; exit 0; } ==============/snap/========================
With this, I can have the same scripts and config files on all systems (helps to keep things up2date), and just add the appr. entry (in this case, iostat) to the host part in bb-hosts ti run the script on a particular host.
- Cleaned up the regex a bit
- As we're using drbd (DistributedRemoteBlockDevice, often used with Linux-HA), I added "drbd" to the devices list.
Maybe someone can use my version, or get some ideas from it.
hh
Martin Flemming schrieb:
Hi, Harald !
http://www.docum.org/foswiki/bin/view/Xymon/LinuxIostatGraphs
Cheers, martin
On Tue, 31 Mar 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its > output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned > there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is >
no longer valid. Any ideas where I can get it? Thanks, Harald -- > Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications Westfalendamm 98 44141 Dortmund Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph > Hartwig Amtsgericht Dortmund HRB 5839 Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/> To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk>
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Gruss
Martin Flemming
Martin Flemming DESY / IT office : Building 2b / 008a Notkestr. 85 phone : 040 - 8998 - 4667 22603 Hamburg mail : martin.flemming at desy.de
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Ok, that explains , why it's thinking to be server-side-script :-)
thanks, martin
On Tue, 7 Apr 2009, Husemann, Harald wrote:
Hi Martin,
in our setup, we have a complete copy of the bb-hosts file on all clients in $BBCLIENTHOME/etc, which we use to control which external client script should run on which client. We have pre-compiled clients for all systems on the Hobbit server, including all config files, which are stored as tarballs. When I'm setting up a new client, I just add the appr. lines in the server's bb-hosts file, copy the new bb-hosts to the tarballs (we're planning to use something like rcsvi in the future to automate this step), and then execute a script on the server which uses scp and ssh to contact the new client, copy the tarball, untar it and start the client. Hope this sheds some light on the preamble, :-).
hh
Martin Flemming schrieb:
Hi, Harald !
thanks for the hint with drdb !
Hmm, .. but dont't understand your "preamble", if i use your script, it seem's that the script think, that it's serverside-script ... ;-)
[it-hobbit2] /usr/lib/hobbit/client # bin/bbcmd ext/new_linux-iostat.pl 2009-04-06 23:56:55 Using default environment file /usr/lib/hobbit/client/etc/hobbitclient.cfg 2009-04-06 23:56:55 Cannot load bb-hosts, or file is empty Not running on it-hobbit2...
[it-hobbit2] /usr/lib/hobbit/client #
.. but it isn't one ...
What's is missing in my enviroment ?
thanks & cheers,
martinOn Thu, 2 Apr 2009, Husemann, Harald wrote:
Hi Martin,
thanks for the link (and thanks to the programmer of linux-iostat), I've installed it (with some additions/changes, see below) as described, and it works and shows what I need, :-). I attach my version of the script to this mail, since I made some edits:
- Added my "preamble" which I use in every extension script:
===============/snip/====================== my $TEST = "iostat"; (...) my $HOST = $ENV{"MACHINE"}; $HOST =~ s/(.*),.*,.*$/$1/; if (system("$ENV{'BBHOME'}/bin/bbhostgrep $TEST | grep $HOST > /dev/null 2>&1") != 0) { print "Not running on $HOST..." if $debug; exit 0; } ==============/snap/========================
With this, I can have the same scripts and config files on all systems (helps to keep things up2date), and just add the appr. entry (in this case, iostat) to the host part in bb-hosts ti run the script on a particular host.
- Cleaned up the regex a bit
- As we're using drbd (DistributedRemoteBlockDevice, often used with Linux-HA), I added "drbd" to the devices list.
Maybe someone can use my version, or get some ideas from it.
hh
Martin Flemming schrieb:
Hi, Harald !
http://www.docum.org/foswiki/bin/view/Xymon/LinuxIostatGraphs
Cheers, martin
On Tue, 31 Mar 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its > output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned > there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is > no longer valid. Any ideas where I can get it? Thanks, Harald -- > Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications Westfalendamm 98 44141 Dortmund Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph > Hartwig Amtsgericht Dortmund HRB 5839 Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/> To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk > >
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Gruss
Martin Flemming______________________________________________________ Martin Flemming DESY / IT office : Building 2b / 008a Notkestr. 85 phone : 040 - 8998 - 4667 22603 Hamburg mail : martin.flemming at desy.de
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Gruss
Martin Flemming
Martin Flemming DESY / IT office : Building 2b / 008a Notkestr. 85 phone : 040 - 8998 - 4667 22603 Hamburg mail : martin.flemming at desy.de
On Tuesday 31 March 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is no longer valid. Any ideas where I can get it? For further reference, I added some Redirect statements so all references to twiki and/or Hobbit are redirected to /foswiki/bin/view/Xymon
Stef
Hi Stef,
This server patch, is it included in Xymon 4.3.2 for example? If not, which version does include this patch?
-- Peter
2009/3/31, Stef Coene <stef.coene at docum.org>:
On Tuesday 31 March 2009, Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring, and include its output in the Hobbit pages. I've found an old post about it, but it seems that the URL mentioned there (http://www.docum.org/twiki/bin/view/Hobbit/LinuxIostatGraphs) is no longer valid. Any ideas where I can get it?
For further reference, I added some Redirect statements so all references to twiki and/or Hobbit are redirected to /foswiki/bin/view/Xymon
Stef
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- 24 Beers in a crate, 24 hours in a day. Coincidence?
On Wednesday 01 April 2009, Peter Welter wrote:
Hi Stef,
This server patch, is it included in Xymon 4.3.2 for example? If not, which version does include this patch? If I'm not mistaken, it is include in the lates xymon release. To be sure, unpack the source and if you find a file do_trends.c, the patch is ok.
Stef
On Tuesday 31 March 2009 19:09:12 Husemann, Harald wrote:
Hi all,
I'd like to use iostat for performance monitoring
BTW, I added a diskio test in the devmon linux-netsnmp test a while back, which can give you per-block-device graphs of disk IO operations (IOPS) and (with the last two commits I just made today) bandwidth (in Bps).
I didn't want to advertise it earlier, but I validated the data today on a production system, and it looks correct ....
Regards, Buchan
[1] http://devmon.svn.sourceforge.net/viewvc/devmon/trunk/templates/linux- netsnmp/diskio/
Husemann, Harald a écrit :
Hi,
hm, first was comes in mind (not tested):
- use a find command in client-local.cfg, like 'find / -name "*_FIXED_PART_1*" |'
- use a regex along with noexist in hobbit-clients.cfg, like: FILE %.*_FIXED_PART_1.* red noexist
That should do the trick...
hh
dOCtoR MADneSs schrieb:
Josh Luthman a écrit :
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote:
Hi, Xymon allow me to test the non existence of file or directory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example : I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red So, is there a "normal" way to use "files" test included inxymon ?
Regards, Damien To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk>A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Tks for your help, but your trick didn't work.
I added file:'find / -type d -name "*_FIXED_PART_*" |' to my host section in client-local.cfg then I added FILE %.*_FIXED_PART_.* red noexist to my host section in hobbit-clients.cfg
but nothing happens when i created a directory called _FIXED_PART_test in /tmp (no alert or anything) in files test, i've the following :
&green 'find / -type d -name "*_FIXED_PART_*" |' <https://www.makelofine.org/xymon-cgi/bb-hostsvc.sh?CLIENT=stan&SECTION=file:%27find%20/warez%20-type%20d%20-name>
When I click on the link, i've : <No data>
When I manually execute : find /-type d -name "*_FIXED_PART_*" I can see /tmp/_FIXED_PART_test
Hi,
two remarks:
Did you use backticks (`) around the command? And, I made a mistake with the "|", this is not necessary.
So, the right format for the entry in client-local.cfg is:
file:find / -type d -name "*_FIXED_PART_*"
(refer to the manpage of client-local.cfg for it)
HTH,
hh
dOCtoR MADneSs schrieb:
Husemann, Harald a écrit :
Hi,
hm, first was comes in mind (not tested):
- use a find command in client-local.cfg, like 'find / -name "*_FIXED_PART_1*" |'
- use a regex along with noexist in hobbit-clients.cfg, like: FILE %.*_FIXED_PART_1.* red noexist
That should do the trick...
hh
dOCtoR MADneSs schrieb:
Josh Luthman a écrit :
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote:
Hi, Xymon allow me to test the non existence of file or directory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example : I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red So, is there a "normal" way to use "files" test included inxymon ?
Regards, Damien To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk>A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Tks for your help, but your trick didn't work.
I added file:'find / -type d -name "*_FIXED_PART_*" |' to my host section in client-local.cfg then I added FILE %.*_FIXED_PART_.* red noexist to my host section in hobbit-clients.cfg
but nothing happens when i created a directory called _FIXED_PART_test in /tmp (no alert or anything) in files test, i've the following :
&green 'find / -type d -name "*_FIXED_PART_*" |' <https://www.makelofine.org/xymon-cgi/bb-hostsvc.sh?CLIENT=stan&SECTION=file:%27find%20/warez%20-type%20d%20-name>
When I click on the link, i've : <No data>
When I manually execute : find /-type d -name "*_FIXED_PART_*" I can see /tmp/_FIXED_PART_test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
Husemann, Harald a écrit :
Hi,
two remarks:
Did you use backticks (`) around the command? And, I made a mistake with the "|", this is not necessary.
So, the right format for the entry in client-local.cfg is:
file:
find / -type d -name "*_FIXED_PART_*"(refer to the manpage of client-local.cfg for it)
HTH,
hh
dOCtoR MADneSs schrieb:
Husemann, Harald a écrit :
Hi,
hm, first was comes in mind (not tested):
- use a find command in client-local.cfg, like 'find / -name "*_FIXED_PART_1*" |'
- use a regex along with noexist in hobbit-clients.cfg, like: FILE %.*_FIXED_PART_1.* red noexist
That should do the trick...
hh
dOCtoR MADneSs schrieb:
Josh Luthman a écrit :
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote:
Hi, Xymon allow me to test the non existence of file or directory.But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example :
I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red So, is there a "normal" way to use "files" test included inxymon ?
Regards, Damien To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk>A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Tks for your help, but your trick didn't work.
I added file:'find / -type d -name "*_FIXED_PART_*" |' to my host section in client-local.cfg then I added FILE %.*_FIXED_PART_.* red noexist to my host section in hobbit-clients.cfg
but nothing happens when i created a directory called _FIXED_PART_test in /tmp (no alert or anything) in files test, i've the following :
&green 'find / -type d -name "*_FIXED_PART_*" |' <https://www.makelofine.org/xymon-cgi/bb-hostsvc.sh?CLIENT=stan&SECTION=file:%27find%20/warez%20-type%20d%20-name>
When I click on the link, i've : <No data>
When I manually execute : find /-type d -name "*_FIXED_PART_*" I can see /tmp/_FIXED_PART_test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Ok for the "|", but, can you remind me the usage of "%" in regex ? I think it should be ^ instead in : FILE %.*_FIXED_PART_.* red noexist no ?
dOCtoR MADneSs a écrit :
Husemann, Harald a écrit :
Hi,
two remarks:
Did you use backticks (`) around the command? And, I made a mistake with the "|", this is not necessary.
So, the right format for the entry in client-local.cfg is:
file:
find / -type d -name "*_FIXED_PART_*"(refer to the manpage of client-local.cfg for it)
HTH,
hh
dOCtoR MADneSs schrieb:
Husemann, Harald a écrit :
Hi,
hm, first was comes in mind (not tested):
- use a find command in client-local.cfg, like 'find / -name "*_FIXED_PART_1*" |'
- use a regex along with noexist in hobbit-clients.cfg, like: FILE %.*_FIXED_PART_1.* red noexist
That should do the trick...
hh
dOCtoR MADneSs schrieb:
Josh Luthman a écrit :
Off the top of my head I think you want something like,
if {-d /this/subdir} echo BBVAR=green else echo BBVAR=red
I'm sure I'm missing a lot, not looking at it right now. Pretty sure -d tests directories.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote:
Hi, Xymon allow me to test the non existence of file ordirectory. But I'd like a more complex test. In my case, I don't want any directory named _FIXED_PART_anything in a whole tree. Example :
I've /toto/_FIXED_PART_1 -> test is red /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red So, is there a "normal" way to use "files" test included inxymon ?
Regards, Damien To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk>A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Tks for your help, but your trick didn't work.
I added file:'find / -type d -name "*_FIXED_PART_*" |' to my host section in client-local.cfg then I added FILE %.*_FIXED_PART_.* red noexist to my host section in hobbit-clients.cfg
but nothing happens when i created a directory called _FIXED_PART_test in /tmp (no alert or anything) in files test, i've the following :
&green 'find / -type d -name "*_FIXED_PART_*" |' <https://www.makelofine.org/xymon-cgi/bb-hostsvc.sh?CLIENT=stan&SECTION=file:%27find%20/warez%20-type%20d%20-name>
When I click on the link, i've : <No data>
When I manually execute : find /-type d -name "*_FIXED_PART_*" I can see /tmp/_FIXED_PART_test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Ok for the "|", but, can you remind me the usage of "%" in regex ? I think it should be ^ instead in : FILE %.*_FIXED_PART_.* red noexist no ?
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Now it's almost working ! I just had to wait a little Thank you for your help !
Hi,
nice that you got it, :-). You had to wait a little because of the inner communication flow of Hobbit: When a client for which you've updated client-local.cfg connects the server to send its report, the server tells the client that there's a new part in client-local.cfg for it. The client downloads the new config, and applies it to its local configuration, which is read in the NEXT run of the client. So, it can take something between 10 and 20 mins (two poll cylces) before you get the new report. @Hobbit-gurus: I hope I haven't mixed up things in this description, :-)
hh
dOCtoR MADneSs schrieb:
dOCtoR MADneSs a écrit :
Husemann, Harald a écrit :
Hi,
two remarks:
Did you use backticks (`) around the command? And, I made a mistake with the "|", this is not necessary.
So, the right format for the entry in client-local.cfg is:
file:
find / -type d -name "*_FIXED_PART_*"(refer to the manpage of client-local.cfg for it)
HTH,
hh
dOCtoR MADneSs schrieb:
Husemann, Harald a écrit :
Hi,
hm, first was comes in mind (not tested):
- use a find command in client-local.cfg, like 'find / -name "*_FIXED_PART_1*" |'
- use a regex along with noexist in hobbit-clients.cfg, like: FILE %.*_FIXED_PART_1.* red noexist
That should do the trick...
hh
dOCtoR MADneSs schrieb:
Josh Luthman a écrit : > Off the top of my head I think you want something like, > > if {-d /this/subdir} > echo BBVAR=green > else > echo BBVAR=red > > I'm sure I'm missing a lot, not looking at it right now. Pretty > sure -d tests directories. > > Josh Luthman > Office: 937-552-2340 > Direct: 937-552-2343 > 1100 Wayne St > Suite 1337 > Troy, OH 45373 > > Those who don't understand UNIX are condemned to reinvent it, > poorly. > --- Henry Spencer > > > On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs > <doctor at makelofine.org <mailto:doctor at makelofine.org>> wrote: > > Hi, > > Xymon allow me to test the non existence of file or > directory. But > I'd like a more complex test. In my case, I don't want any > directory named _FIXED_PART_anything in a whole tree. > Example : > > I've > /toto/_FIXED_PART_1 -> test is red > /toto/a/sub/directory/_FIXED_PART_hello_world -> test is red > > So, is there a "normal" way to use "files" test included in > xymon ? > > Regards, > Damien > > To unsubscribe from the hobbit list, send an e-mail to > hobbit-unsubscribe at hswn.dk <mailto:hobbit-unsubscribe at hswn.dk> > > > A shell script should look like this :
find $TREE -type d -name _FIXED_PART_\* if [ $? -eq 0 ] ; then BBVAR=red else BBVAR=green fi
But i prefer to use integrated "files" test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Tks for your help, but your trick didn't work.
I added file:'find / -type d -name "*_FIXED_PART_*" |' to my host section in client-local.cfg then I added FILE %.*_FIXED_PART_.* red noexist to my host section in hobbit-clients.cfg
but nothing happens when i created a directory called _FIXED_PART_test in /tmp (no alert or anything) in files test, i've the following :
&green 'find / -type d -name "*_FIXED_PART_*" |' <https://www.makelofine.org/xymon-cgi/bb-hostsvc.sh?CLIENT=stan&SECTION=file:%27find%20/warez%20-type%20d%20-name>
When I click on the link, i've : <No data>
When I manually execute : find /-type d -name "*_FIXED_PART_*" I can see /tmp/_FIXED_PART_test
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Ok for the "|", but, can you remind me the usage of "%" in regex ? I think it should be ^ instead in : FILE %.*_FIXED_PART_.* red noexist no ?
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Now it's almost working ! I just had to wait a little Thank you for your help !
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Harald Husemann Netzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & Communications
Westfalendamm 98 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig Amtsgericht Dortmund HRB 5839
Tel: +49 231 9505 222 Fax: +49 231 9505 100 www.annyway.com <http://www.annyway.com/> www.materna.com <http://www.materna.com/>
participants (7)
-
bgmilne@staff.telkomsa.net
-
doctor@makelofine.org
-
Harald.Husemann@materna.de
-
josh@imaginenetworksllc.com
-
martin.flemming@desy.de
-
peter.welter@gmail.com
-
stef.coene@docum.org