Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
This plugin seems far more complete then most others. I found a few minor bugs with Cluster_Memory_Usage, Cluster_CPU_Usage, and Host_Status. The diff file will fix this as of 5/6/2014):
vi-admin@mpvmat:~> diff -u orig/box293_check_vmware.pl box293_check_vmware.pl — orig/box293_check_vmware.pl 2014-05-06 10:09:44.000000000 -0400 +++ box293_check_vmware.pl 2014-05-06 14:55:18.000000000 -0400 @@ -714,7 +714,7 @@ my $host_maintenance_mode = $cluster_current_host->get_property(‘summary.runtime.inMaintenanceMode’);
# See if the host is in maintenance mode – if ($host_maintenance_mode eq ‘true’) { + if ($host_maintenance_mode eq ‘false’) { # Get the overall CPU used by the current host my $cluster_cpu_usage_current_host = $cluster_current_host->get_property(‘summary.quickStats.overallCpuUsage’); # Convert the $cluster_cpu_usage_current_host to SI @@ -726,7 +726,7 @@ # Get how many cores this host has $cpu_cores_available = $cpu_cores_available + $cluster_current_host->get_property(‘summary.hardware.numCpuCores’);
– } # End if ($host_maintenance_mode eq ‘true’) { + } # End if ($host_maintenance_mode eq ‘false’) { } # End if ($host_uptime_state_flag == 0) { } # End if ($host_connection_state_flag == 0) { } # End foreach (@{$cluster_hosts}) { @@ -1181,7 +1181,7 @@ my $host_maintenance_mode = $cluster_current_host->get_property(‘summary.runtime.inMaintenanceMode’);
# See if the host is in maintenance mode – if ($host_maintenance_mode eq ‘true’) { + if ($host_maintenance_mode eq ‘false’) { # Get the overall memory used by the current host my $cluster_memory_usage_current_host = $cluster_current_host->get_property(‘summary.quickStats.overallMemoryUsage’); # Convert the $cluster_memory_usage_current_host to SI @@ -1189,7 +1189,7 @@
# Add this to cluster_memory_usage $cluster_memory_usage = $cluster_memory_usage + $cluster_memory_usage_current_host; – } # End if ($host_maintenance_mode eq ‘true’) { + } # End if ($host_maintenance_mode eq ‘false’) { } # End if ($host_uptime_state_flag == 0) { } # End if ($host_connection_state_flag == 0) { } # End foreach (@{$cluster_hosts}) { @@ -4167,7 +4167,7 @@ } # End if (defined($host_issues)) {
# See if the host is in maintenance mode – if ($host_maintenance_mode eq ‘false’) { + if ($host_maintenance_mode eq ‘true’) { $exit_message = Build_Exit_Message(‘Exit’, $exit_message, ‘Host in Maintenance Mode’); $exit_state = Build_Exit_State($exit_state, ‘OK’); $host_status_flag = 1;