Build precise queries to find exactly what you need
Press ESC to close
Added performance data output. Maybe you will alter the script?
— check_disk_snmp.pl_2011-06-01_091729-536735145 2011-05-30 17:00:49.195836862 +0200 +++ check_disk_snmp.pl 2011-06-01 10:33:59.627838690 +0200 @@ -40,7 +40,10 @@ my $devUsed = q{}; ## – used oid my $perc = 0; ## – device percent used my $free = 0; ## – device free space +my $used = 0; ## – device used space my $size = 0; ## – device size +my $size_warn = 0; ## – device warning size +my $size_crit = 0; ## – device critical size my %unit_t = ( ## – units table ‘KB’ => 1 {$devSize}) * 100); $size = sprintf(“%0.2f”, $resp->{$devSize} / $unit_sz); +$size_warn = sprintf(“%0.2f”, ($resp->{$devSize} / 100) * substr($warn,0,-1) / $unit_sz); +$size_crit = sprintf(“%0.2f”, ($resp->{$devSize} / 100) * substr($crit,0,-1) / $unit_sz); +$used = sprintf(“%0.2f”, $resp->{$devUsed} / $unit_sz); $free = sprintf(“%0.2f”, ($resp->{$devSize} – $resp->{$devUsed}) / $unit_sz ); @@ -334,8 +340,9 @@ if ($free >= 100) {$free = commify(int($free))} if ($size >= 100) {$size = commify(int($size))}
-print “SNMP $state – “, – “$resp->{$devDesc} at ${perc}% with $free of $size $unit_desc freen”; +print “DISK $state – “, + “$resp->{$devDesc} at ${perc}% with $free of $size $unit_desc free”, + ” | disk_usage=$used$unit_desc;$size_warn;$size_crit;0;$sizen”;
exit $ERRORS{$state};
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!