Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

tweaver

Reviews(1)
bytweaver, March 8, 2013
Check Hyperv Performance
Nice easy to use plugin. I did make a couple of changes on the plugin on my environment:

Added an extra function to change Bytes into MBytes:
sub normalize {
my $megabits = $_[0] / 1048576;
return $megabits;
}

Then at the end of the script added the following to line 178:

if($option eq "gueststorage") {
#Convert Display to MB/s
my @originalSpeed = $columns[0] =~ m/= (d+.d+)/;
my $speed = sprintf("%.2f", normalize($originalSpeed[0]));
$columns[0] =~ s/$originalSpeed[0] b/s/$speed MB/s/;

#Convert Perf Data to MB/s
my @originalSpeed = $columns[1] =~ m/=(d+.d+)/;
my $speed = sprintf("%.2f", normalize($originalSpeed[0]));
$columns[1] =~ s/$originalSpeed[0]b/s/${speed}MB/s/;

}

It just puts the Bytes/s into MBytes/s when using "gueststorage" and rounds to 2 decimal places just for easier readability.