to test the non-existence of a dir
list dOCtoR MADneSs
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
list Josh Luthman
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: 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
▸
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid>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
list dOCtoR MADneSs
▸
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: 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
On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs
<user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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
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
list Harald Husemann
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: 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 On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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, DamienA 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
--
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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
list Harald Husemann
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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
list Martin Flemming
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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
list Stef Coene
▸
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
list dOCtoR MADneSs
▸
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: 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 On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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, DamienA 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
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
list Harald Husemann
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: 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 On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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, DamienA 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" testTks 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
-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
list dOCtoR MADneSs
▸
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: 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 On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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, DamienA 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" testTks 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
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 ?
list dOCtoR MADneSs
▸
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: 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 On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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, DamienA 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" testTks 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_testOk 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 ?
Now it's almost working ! I just had to wait a little Thank you for your help !
list Harald Husemann
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: 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 On Tue, Mar 31, 2009 at 10:29 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid <mailto:user-d54077869176@xymon.invalid>> 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, DamienA 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" testTks 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_testOk 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 ?Now it's almost working ! I just had to wait a little Thank you for your help !
-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
list Peter Welter
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 <user-dbffe946c0f4@xymon.invalid>:
▸
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
--
24 Beers in a crate, 24 hours in a day. Coincidence?
list Stef Coene
▸
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
list Buchan Milne
▸
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/
list Harald Husemann
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:
1. 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.
2. Cleaned up the regex a bit
3. 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
Attachments (1)
list Martin Flemming
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: 1. 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. 2. Cleaned up the regex a bit 3. 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 HusemannNetzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & CommunicationsWestfalendamm 9844141 DortmundGeschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph > HartwigAmtsgericht Dortmund HRB 5839Tel: +XX XXX XXXX XXXFax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX 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 : XXX - XXXX - XXXX
22603 Hamburg mail : user-f286aaa49a76@xymon.invalid
list Harald Husemann
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, 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: 1. 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. 2. Cleaned up the regex a bit 3. 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 HusemannNetzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & CommunicationsWestfalendamm 9844141 DortmundGeschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph > HartwigAmtsgericht Dortmund HRB 5839Tel: +XX XXX XXXX XXXFax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX 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 : XXX - XXXX - XXXX 22603 Hamburg mail : user-f286aaa49a76@xymon.invalid
-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;
list Martin Flemming
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, 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:1. 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. 2. Cleaned up the regex a bit3. 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 HusemannNetzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & CommunicationsWestfalendamm 9844141 DortmundGeschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, > > Ralph > HartwigAmtsgericht Dortmund HRB 5839Tel: +XX XXX XXXX XXXFax: +XX XXX XXXX XXX www.annyway.com <http://www.annyway.com/>; www.materna.com <http://www.materna.com/>;-- > Harald HusemannNetzwerk- und Systemadministrator Operation Management Center (OMC) MATERNA GmbH Information & CommunicationsWestfalendamm 9844141 DortmundGeschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph > HartwigAmtsgericht Dortmund HRB 5839Tel: +XX XXX XXXX XXXFax: +XX XXX XXXX XXX 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 : XXX - XXXX - XXXX 22603 Hamburg mail : user-f286aaa49a76@xymon.invalid-- 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: +XX XXX XXXX XXX Fax: +XX XXX XXXX XXX 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 : XXX - XXXX - XXXX
22603 Hamburg mail : user-f286aaa49a76@xymon.invalid