[monitoring-plugin-perl] Handling if only the warning or critical is set
A Codeweavers Infrastructure Bod
git at monitoring-plugins.org
Mon Sep 14 11:50:03 CEST 2020
Module: monitoring-plugin-perl
Branch: master
Commit: 1b5dbf6c09952a69843e08bd8943506e98bcfe1a
Author: A Codeweavers Infrastructure Bod <36475663+infraweavers at users.noreply.github.com>
Date: Mon Sep 14 09:52:29 2020 +0100
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=1b5dbf6
Handling if only the warning or critical is set
---
lib/Monitoring/Plugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Monitoring/Plugin.pm b/lib/Monitoring/Plugin.pm
index 3660ba7..7a4617d 100644
--- a/lib/Monitoring/Plugin.pm
+++ b/lib/Monitoring/Plugin.pm
@@ -159,7 +159,7 @@ sub getopts {
$self->set_thresholds(
warning => $self->opts->warning,
critical => $self->opts->critical,
- ) if ( defined $self->opts->warning && defined $self->opts->critical );
+ ) if ( defined $self->opts->warning || defined $self->opts->critical );
}
sub _check_for_opts {
More information about the Commits
mailing list