ESX Hosts
Jon Dustin
jdustin at usm.maine.edu
Tue Jan 13 17:36:46 CET 2009
>>> On 1/12/2009 at 10:38 PM, in message <496C491C.0B6 : 45 : 32950>, "Everett,
Vernon" <Vernon.Everett at woodside.com.au> wrote:
> Hi all
>
> Has anybody had any success monitoring ESX hosts yet?
> In particular, I am looking for HBA and disk stats, CPU, memory, etc.
> The usual suspects.
I decided to use a "standard" Hobbit client running on the service console, then add my own customizations:
- use vdf for disk space monitoring instead of df (picks up VMDK volumes)
- use esxtop to get CPU usage for entire ESX box
Here is a snippet I wrote for parsing ESXTOP output:
my $esxtop = "sudo /usr/bin/esxtop -b -d $interval";
open(CMD,"$esxtop |") || die "error - could not open $esxtop $!\n";
my $count = 0;
while( <CMD> ) {
chomp;
s/\"//g;
my (@row) = split/\,/;
$count++;
if ( $count <= 2 ) { next; } # skip 1st few results, just titles and 100% values
my $util = int($row[9]); # round to INT, because RRD does not like floating-point
&SendHobbit($util);
if ( $verbose ) { print "util = $util\n"; }
}
I hope this helps, please don't flame my crappy code... Enjoy!
--
Jon Dustin - Network Specialist
University of Southern Maine
Portland, ME 207-780-4152
More information about the Xymon
mailing list