From 04dbab2eac1edd9556795cd8523b330253fffc01 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Mon, 9 Feb 2015 09:03:03 +0100 Subject: [PATCH] Fix output of check_ping --- plugins/check_ping.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/check_ping.cpp b/plugins/check_ping.cpp index 8f4e3612d..258265a46 100644 --- a/plugins/check_ping.cpp +++ b/plugins/check_ping.cpp @@ -239,7 +239,7 @@ int printOutput(printInfoStruct& printInfo, response& response) state state = OK; double plp = ((double)response.dropped / printInfo.num) * 100.0; - wstring test = removeZero(plp); + if (printInfo.warn.rend(response.avg) || printInfo.wpl.rend(plp)) state = WARNING; @@ -249,7 +249,7 @@ int printOutput(printInfoStruct& printInfo, response& response) std::wstringstream perf; perf << L"rta=" << response.avg << L"ms;" << printInfo.warn.pString() << L";" << printInfo.crit.pString() << L";0;" << " pl=" << removeZero(plp) << "%;" - << printInfo.warn.pString() << ";" << printInfo.crit.pString() << ";0;100"; + << printInfo.wpl.pString() << ";" << printInfo.cpl.pString() << ";0;100"; if (response.dropped == printInfo.num) { wcout << L"PING CRITICAL ALL CONNECTIONS DROPPED | " << perf.str() << endl;