Backport fix from Daniel Jakots

Original commit:

The code was taken from check_http_many which apparently deals only with return
codes 0, 1 and 2. Here, we uses check_nrpe which iff it can't connect, it
returns 255
(40717e320c).

So I decided that if the return code is greater or equal to 2, then we consider
it's critical. I can't see any return code greater than 2 which may not be
critical.
This commit is contained in:
Benoît S. 2018-07-10 11:32:18 +02:00
parent 55d05cd4f0
commit 961d9da5e5
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ check_state() {
cat $result >> ${result}.err
:> $result
fi
if [[ $1 -eq 2 ]]; then
if [[ $1 -ge 2 ]]; then
critical=true
cat $result >> ${result}.err
:> $result