From bee00b1e5e975220bba63b1235163f177e8076ac Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 14 Mar 2022 14:12:16 +0100
Subject: [PATCH] show exitcode of check in the log

---
 icinga-cli.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/icinga-cli.sh b/icinga-cli.sh
index e9e3e36..35b4b52 100755
--- a/icinga-cli.sh
+++ b/icinga-cli.sh
@@ -403,9 +403,9 @@ function processCheck(){
       # _testHttpOk ${_response} >/dev/null
       http.isOk >/dev/null
       if [ $? -eq 0 ]; then
-        _elog "${_logPrefix} OK, response was sent to Icinga"
+        _elog "${_logPrefix} rc=$rc - OK, response was sent to Icinga"
       else
-        _elog "${_logPrefix} WARNING: the check response was NOT sent to Icinga"
+        _elog "${_logPrefix} rc=$rc - WARNING: the check response was NOT sent to Icinga"
         _rc=$_rc+1
         _echo
         _echo For Debugging:
-- 
GitLab