From 616c817a8b9eb755cba9e150798983de31f59f03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <Joerg.Sachse@slub-dresden.de>
Date: Fri, 18 Mar 2022 14:26:02 +0100
Subject: [PATCH] feat: provide historical data on Rosetta uptime via Check_MK
 plugin

---
 .../lib/check_mk_agent/plugins/check_rosetta_heartbeat.sh   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/files/usr/lib/check_mk_agent/plugins/check_rosetta_heartbeat.sh b/files/usr/lib/check_mk_agent/plugins/check_rosetta_heartbeat.sh
index dece893..b8beffb 100755
--- a/files/usr/lib/check_mk_agent/plugins/check_rosetta_heartbeat.sh
+++ b/files/usr/lib/check_mk_agent/plugins/check_rosetta_heartbeat.sh
@@ -49,11 +49,13 @@ flock -n 9 || exit 1
 
     if [[ "${RESULT}" =~ '<return>DataManagerServicesWSImpl</return>' ]]; then
         status=0
-        statustext="Rosetta is running (got correct) answer from the heartbeat API)."
+        statustext="Rosetta is running (got correct answer from the heartbeat API)."
+	perf_values="rosetta_up=1"
     else
         status=2
         statustext="Rosetta is NOT running."
+	perf_values="rosetta_up=0"
     fi
 
     echo "${status} ${itemname} ${perf_values} ${statustext}"
-) 9>"${LOCKFILE}"
\ No newline at end of file
+) 9>"${LOCKFILE}"
-- 
GitLab