summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9452b46)
raw | patch | inline | side by side (parent: 9452b46)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Tue, 28 Jan 2003 07:17:24 +0000 (07:17 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Tue, 28 Jan 2003 07:17:24 +0000 (07:17 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@257 f882894a-f735-0410-b71e-b25c423dba1c
contrib/checkciscotemp.pl | patch | blob | history |
index a702a89ef2c3c924c0977423e0fb6ff567209415..c999e193a505ab97d975b69977b59d787f94da74 100644 (file)
# (in accordance with the plugin coding guidelines)
####################################
-use Net::SNMP;
+#use Net::SNMP;
use Getopt::Long;
&Getopt::Long::config('auto_abbrev');
}
if (defined($critical_vals)) {
- die "Cannot Parse Critical Thresholds\n"
- unless (split(/:/,$critical_vals)>=2);
- ($inlet_thresh,$outlet_thresh) = @_
+ if ($critical_vals =~ m/^([0-9]+)[,:]([0-9]+)$/) {
+ ($inlet_thresh,$outlet_thresh) = ($1, $2);
+ } else {
+ die "Cannot Parse Critical Thresholds\n";
+ }
}
-die unless(defined($inlet_thresh) && defined($outlet_thresh));
if (defined($warning_vals)) {
- die "Cannot Parse Critical Thresholds\n"
- unless (split(/:/,$warning_vals)>=2);
- ($inlet_warn,$outlet_warn) = @_;
+ if ($warning_vals =~ m/^([0-9]+)[:,]([0-9]+)$/) {
+ ($inlet_warn,$outlet_warn) = ($1, $2);
+ } else {
+ die "Cannot Parse Warning Thresholds\n";
+ }
}else{
$inlet_warn=$inlet_thresh;
$outlet_warn=$outlet_thresh;