Xymon Mailing List Archive search

Graphing iostat on Linux systems?

list Martin Flemming
Tue, 7 Apr 2009 00:15:54 +0200 (CEST)
Message-Id: <user-3d0755c946b2@xymon.invalid>

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 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/>;

Gruss

        Martin Flemming


Martin Flemming
DESY / IT          office : Building 2b / 008a
Notkestr. 85       phone  : XXX - XXXX - XXXX
22603 Hamburg      mail   : user-f286aaa49a76@xymon.invalid