summaryrefslogtreecommitdiffstats
path: root/lib/Nagios/Plugin/Threshold.pm
diff options
context:
space:
mode:
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;