From 8dd671feebd467f6a10edfe8fe8016911decf319 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Mon, 28 Feb 2022 16:55:54 +0100 Subject: [PATCH] eol: remove negative performance data --- check_eol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check_eol b/check_eol index f917eea..cc4c4ab 100755 --- a/check_eol +++ b/check_eol @@ -46,6 +46,7 @@ # 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions # 2021-03-26 v1.2 <axel.hahn@iml.unibe.ch> test major version if minor version was not detected # 2021-11-02 v1.3 <axel.hahn@iml.unibe.ch> detect centos stream +# 2022-02-28 v1.4 <axel.hahn@iml.unibe.ch> remove negative performance data # ====================================================================== . `dirname $0`/inc_pluginfunctions @@ -256,6 +257,8 @@ else grep "^$myKey:" $eolcfg | grep -v ":$myKey:[0-9]" | cut -f 3- -d ":" echo echo "Limit Info: warn below $iDaysWarn days; critical below $iDaysCritical days" + + test ${myDaysLeft} -lt 0 && myDaysLeft=0 ph.perfadd "$myKey-v$myEolVer" "${myDaysLeft}" $iDaysWarn $iDaysCritical 0 -- GitLab