aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-05-15 13:20:51 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-05-15 13:20:51 +0000
commita3bd698ef9c54c7b5a8b735a13dc8f426c94e514 (patch)
tree8fdbd8a103d22dc3ce6c5ac4930d0df704801091
parent4a864fb5ab818596fe5d5449faf230300a03c732 (diff)
downloadmonitoring-plugins-a3bd698ef9c54c7b5a8b735a13dc8f426c94e514.tar.gz
check_disk_snmp.pl removed. Notice added to CHANGES
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1391 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--CHANGES2
-rw-r--r--contrib/check_disk_snmp.pl74
2 files changed, 2 insertions, 74 deletions
diff --git a/CHANGES b/CHANGES
index e9f3464f..b58135b5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,8 @@ This file documents the major additions and syntax changes between releases.
1.4.4
New C based check_ntp. The perl version is now deprecated.
New check_apt plugin
+ Notice: plugins in contrib/ will start to be removed from this distribution.
+ Please check at http://www.nagiosexchange.org for contributed plugins
1.4.3
Setuid plugins (check_dhcp, check_icmp) separated into plugins-root/. Run make install as root to install
diff --git a/contrib/check_disk_snmp.pl b/contrib/check_disk_snmp.pl
deleted file mode 100644
index a09343dc..00000000
--- a/contrib/check_disk_snmp.pl
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/perl
-# cm@financial.com 07/2002
-use strict;
-use Net::SNMP;
-use Getopt::Std;
-
-my %opts =(
- u => 'nobody', # snmp user
- l => 'authNoPriv', # snmp security level
- a => 'MD5', # snmp authentication protocol
- A => 'nopass', # authentication protocol pass phrase.
- x => 'DES', # privacy protocol
- m => 'localhost', # host
- d => 1, # devicenumber
- w => 70, # warnratio
- c => 85, # critical ratio
- h => 0,
- );
-
-getopts('m:u:l:a:A:x:d:w:c:h',\%opts);
-
-if ( $opts{'h'} ) {
- print "Usage: $0 [ -u <username> ] [ -l <snmp security level>] [ -a <snmp authentication protocol> ] [ -A <authentication protocol pass phrase> ] [ -x <snmp privacy protocol> ] [ -m <hostname>] [ -d <devicenumber> ] [ -w <warning ratio> ] [ -c <critical ratio ]\n";
- exit 1;
-}
-
-if ($opts{'w'} >= $opts{'c'}) {
- print "Errorratio must be higher then Warnratio!\n";
- exit 1;
-}
-
-my ($session, $error) = Net::SNMP->session(
- -hostname => $opts{'m'},
- -nonblocking => 0x0,
- -username => $opts{'u'},
- -authpassword => $opts{'A'},
- -authprotocol => $opts{'a'},
- -version => '3',
- );
-
-if ($@) {
- print "SNMP-Error occured";
- exit 1;
-}
-my $result=undef;
-
-
-my $deviceSize=".1.3.6.1.2.1.25.2.3.1.5.$opts{'d'}";
-my $deviceUsed=".1.3.6.1.2.1.25.2.3.1.6.$opts{'d'}";
-my $deviceName=".1.3.6.1.2.1.25.2.3.1.3.$opts{'d'}";
-my @OID=($deviceSize, $deviceUsed, $deviceName);
-$result = $session->get_request(
- -varbindlist => \@OID,
- );
-
-if (!defined($result)) {
- printf("ERROR: %s.\n", $session->error);
- $session->close;
- exit 1;
-}
-
-my $ratio=$result->{$deviceUsed}*100/$result->{$deviceSize};
-
-if ($ratio > $opts{'c'}){
- printf("CRITICAL: %s usage %.2f%%\n", $result->{$deviceName}, $ratio);
- exit 2;
-}
-if ($ratio > $opts{'w'}){
- printf("WARNING: %s usage %.2f%%\n", $result->{$deviceName}, $ratio);
- exit 1;
-}
-
-printf("OK: %s usage %.2f%%\n", $result->{$deviceName}, $ratio);
-exit 0;