From: Michael Insel Date: Thu, 4 Oct 2018 09:06:27 +0000 (+0200) Subject: Fix check_memory thresholds in 'used' mode X-Git-Tag: v2.10.0~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=002f59e53a0968a49e9528d9c30b9f1ac575e95f;p=icinga2 Fix check_memory thresholds in 'used' mode The thresholds in the used mode now breaks if the value is bigger than the threshold. --- diff --git a/plugins/check_memory.cpp b/plugins/check_memory.cpp index e69e02700..2d723b487 100644 --- a/plugins/check_memory.cpp +++ b/plugins/check_memory.cpp @@ -150,7 +150,11 @@ static int parseArguments(int ac, WCHAR ** av, po::variables_map& vm, printInfoS } } - printInfo.showUsed = vm.count("show-used") > 0; + if (vm.count("show-used")) { + printInfo.showUsed = true; + printInfo.warn.legal = true; + printInfo.crit.legal = true; + } return -1; }