]> granicus.if.org Git - icinga2/commitdiff
Fix check_memory thresholds in 'used' mode 6652/head
authorMichael Insel <michael@insel.email>
Thu, 4 Oct 2018 09:06:27 +0000 (11:06 +0200)
committerMichael Insel <michael@insel.email>
Thu, 4 Oct 2018 09:09:13 +0000 (11:09 +0200)
The thresholds in the used mode now breaks if the value is bigger than
the threshold.

plugins/check_memory.cpp

index e69e02700dc9b9b0030eb2ce64993320c1f4c8b6..2d723b487df8f1442f9457b2b2217bd8f3a3a81f 100644 (file)
@@ -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;
 }