diff --git a/src/check_oreon_ping.pl b/src/check_oreon_ping similarity index 100% rename from src/check_oreon_ping.pl rename to src/check_oreon_ping diff --git a/src/check_oreon_snmp_loadaverage.pl b/src/check_oreon_snmp_loadaverage similarity index 100% rename from src/check_oreon_snmp_loadaverage.pl rename to src/check_oreon_snmp_loadaverage diff --git a/src/check_oreon_snmp_process.pl b/src/check_oreon_snmp_process similarity index 100% rename from src/check_oreon_snmp_process.pl rename to src/check_oreon_snmp_process diff --git a/src/check_oreon_snmp_remote_storage.pl b/src/check_oreon_snmp_remote_storage similarity index 92% rename from src/check_oreon_snmp_remote_storage.pl rename to src/check_oreon_snmp_remote_storage index 79bdc10f0..c9d59422f 100644 --- a/src/check_oreon_snmp_remote_storage.pl +++ b/src/check_oreon_snmp_remote_storage @@ -80,8 +80,8 @@ if ($opt_h) { exit $ERRORS{'OK'}; } if (!$opt_H) { -print_usage(); -exit $ERRORS{'OK'}; + print_usage(); + exit $ERRORS{'OK'}; } if ($opt_n && !$opt_d) { @@ -89,40 +89,35 @@ if ($opt_n && !$opt_d) { exit $ERRORS{'UNKNOWN'}; } my $snmp = "1"; -if ($opt_v && $opt_v =~ /^[0-9]$/) { -$snmp = $opt_v; -} +$snmp = $opt_v if ($opt_v && $opt_v =~ /^[0-9]$/); if ($snmp eq "3") { -if (!$opt_u) { -print "Option -u (--username) is required for snmpV3\n"; -exit $ERRORS{'OK'}; -} -if (!$opt_p && !$opt_k) { -print "Option -k (--key) or -p (--password) is required for snmpV3\n"; -exit $ERRORS{'OK'}; -}elsif ($opt_p && $opt_k) { -print "Only option -k (--key) or -p (--password) is needed for snmpV3\n"; -exit $ERRORS{'OK'}; -} + if (!$opt_u) { + print "Option -u (--username) is required for snmpV3\n"; + exit $ERRORS{'OK'}; + } + if (!$opt_p && !$opt_k) { + print "Option -k (--key) or -p (--password) is required for snmpV3\n"; + exit $ERRORS{'OK'}; + } elsif ($opt_p && $opt_k) { + print "Only option -k (--key) or -p (--password) is needed for snmpV3\n"; + exit $ERRORS{'OK'}; + } } -if (!$opt_C) { -$opt_C = "public"; -} -if (!$opt_d) { -$opt_d = 2; -} +$opt_C = "public" if (!$opt_C); +$opt_d = 2 if (!$opt_d); + ($opt_d) || ($opt_d = shift) || ($opt_d = 2); my $partition = 0; if ($opt_d =~ /([0-9]+)/ && !$opt_n){ $partition = $1; -} -elsif (!$opt_n){ +} elsif (!$opt_n){ print "Unknown -d number expected... or it doesn't exist, try another disk - number\n"; exit $ERRORS{'UNKNOWN'}; } + my $critical = 95; if ($opt_c && $opt_c =~ /^[0-9]+$/) { $critical = $opt_c; diff --git a/src/check_oreon_snmp_traffic.pl b/src/check_oreon_snmp_traffic similarity index 100% rename from src/check_oreon_snmp_traffic.pl rename to src/check_oreon_snmp_traffic diff --git a/src/check_oreon_snmp_value.pl b/src/check_oreon_snmp_value similarity index 100% rename from src/check_oreon_snmp_value.pl rename to src/check_oreon_snmp_value