summaryrefslogtreecommitdiffstats
path: root/lib/Nagios/Plugin/Threshold.pm
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-08-04 20:22:31 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2006-08-04 20:22:31 (GMT)
commit96933fd2e1f53aff9c9ef26639fafe9a84ec754e (patch)
tree307d23df452b83c4d6799303379e208c7adb6317 /lib/Nagios/Plugin/Threshold.pm
parentc0f29b373c0339eec73e325fb15ebef6dd24d230 (diff)
downloadmonitoring-plugin-perl-96933fd2e1f53aff9c9ef26639fafe9a84ec754e.tar.gz
Lots of extra tests and subsequent fixes (Nathan Vonnahme)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1466 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/Nagios/Plugin/Threshold.pm')
-rw-r--r--lib/Nagios/Plugin/Threshold.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Nagios/Plugin/Threshold.pm b/lib/Nagios/Plugin/Threshold.pm
index 1b332b9..494383f 100644
--- a/lib/Nagios/Plugin/Threshold.pm
+++ b/lib/Nagios/Plugin/Threshold.pm
@@ -7,6 +7,8 @@ use warnings;
7 7
8use Nagios::Plugin::Range; 8use Nagios::Plugin::Range;
9use Nagios::Plugin::Base; 9use Nagios::Plugin::Base;
10use Nagios::Plugin;
11our ($VERSION) = $Nagios::Plugin::VERSION;
10 12
11use Class::Struct; 13use Class::Struct;
12struct "Nagios::Plugin::Threshold" => { 14struct "Nagios::Plugin::Threshold" => {
@@ -44,6 +46,7 @@ sub set_thresholds {
44 46
45sub get_status { 47sub get_status {
46 my ($self, $value) = @_; 48 my ($self, $value) = @_;
49
47 if ($self->critical->is_set) { 50 if ($self->critical->is_set) {
48 if ($self->critical->check_range($value) == 1) { 51 if ($self->critical->check_range($value) == 1) {
49 return $ERRORS{CRITICAL}; 52 return $ERRORS{CRITICAL};
@@ -54,6 +57,7 @@ sub get_status {
54 return $ERRORS{WARNING}; 57 return $ERRORS{WARNING};
55 } 58 }
56 } 59 }
60 return $ERRORS{OK};
57} 61}
58 62
591; 631;