diff options
| author | Sven Nierlein <sven@nierlein.de> | 2020-09-14 11:41:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-14 11:41:16 +0200 |
| commit | 3035ed03d86da7f36ba873e0027d7d3a30504256 (patch) | |
| tree | e3ab9ffc9a79826f9c63b4250966cd07da1502df | |
| parent | 9d1b15abb56a9d2d00ed56cabfae4d176bd1e955 (diff) | |
| parent | 1b5dbf6c09952a69843e08bd8943506e98bcfe1a (diff) | |
| download | monitoring-plugin-perl-master.tar.gz | |
Create implicit threshold object if either warning or critical is set
| -rw-r--r-- | lib/Monitoring/Plugin.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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 { | |||
| 159 | $self->set_thresholds( | 159 | $self->set_thresholds( |
| 160 | warning => $self->opts->warning, | 160 | warning => $self->opts->warning, |
| 161 | critical => $self->opts->critical, | 161 | critical => $self->opts->critical, |
| 162 | ) if ( defined $self->opts->warning && defined $self->opts->critical ); | 162 | ) if ( defined $self->opts->warning || defined $self->opts->critical ); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | sub _check_for_opts { | 165 | sub _check_for_opts { |
