From 1491f1cf30c7899ccec924e5ee5b4aad6d8a1154 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Fri, 8 Jul 2022 09:47:12 +0200 Subject: [PATCH] allow empty perfdata --- icinga-cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icinga-cli.sh b/icinga-cli.sh index f8ccc9b..87c2019 100755 --- a/icinga-cli.sh +++ b/icinga-cli.sh @@ -370,7 +370,7 @@ function processCheck(){ # echo -------- extracted performance data: # echo $outPerfdata # echo - if ! echo "$outPerfdata" | grep "=[0-9\.]*;[0-9\.]*;[0-9\.]*;[0-9\.]*;" >/dev/null; then + if ! test -n "$outPerfdata" && echo "$outPerfdata" | grep "=[0-9\.]*;[0-9\.]*;[0-9\.]*;[0-9\.]*;" >/dev/null; then _elog "ABORT - this does not look like performance data: $outPerfdata" exit 1 fi -- GitLab