Build precise queries to find exactly what you need
Press ESC to close
Hi, thanks for this pluging, as was searching for a pluging as I’m using one Nagios server to monitor other Nagios Servers.
I just changed the subroutine check_s_count() to show warning if any service is warning, same idea to critical services.
sub check_s_count(){ my $line; my $counter_service_checks=0; my $counter_warning=0; my $counter_critical=0;
open (FILE, $file) or die $!; $/ = “”;
foreach $line(){ if($line=~/servicestatus/){ $counter_service_checks++; }
if($line=~/plugin_output/){ if($line=~/WARNING/){ $counter_warning++; } } if($line=~/plugin_output/){ if($line=~/CRITICAL/){ $counter_critical++; } } }
close (FILE);
# filling vars for print $text=(“Service Checks: $counter_service_checks – Service Warning: $counter_warning – Service Critial: $counter_critical”); $perfdat=(“count=$counter_service_checks”);
# this ugly thing is needed to return OK: $warning=2; $critical=3;
$value=1; if($counter_warning>0){ $value=$warning; } if($counter_critical>0){ $value=$critical; }
}
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!