From adad7180e038bd7a5e324c787f8e3f3c8b808e2c Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Thu, 8 Sep 2016 16:50:10 +0200 Subject: [PATCH] Fix performance output of check_perfmon fixes #10489 refs #12679 --- plugins/check_perfmon.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/check_perfmon.cpp b/plugins/check_perfmon.cpp index cae6aa5e0..474c639cf 100644 --- a/plugins/check_perfmon.cpp +++ b/plugins/check_perfmon.cpp @@ -337,10 +337,10 @@ BOOL QueryPerfData(printInfoStruct& pI) switch (pI.dwRequestedType) { - case (PDH_FMT_LONG) : + case (PDH_FMT_LONG): pI.dValue = pDisplayValues[0].FmtValue.longValue; break; - case (PDH_FMT_LARGE) : + case (PDH_FMT_LARGE): pI.dValue = pDisplayValues[0].FmtValue.largeValue; break; default: @@ -361,9 +361,8 @@ die: INT PrintOutput(CONST po::variables_map& vm, printInfoStruct& pi) { std::wstringstream wssPerfData; - wssPerfData << "perfmon=" << pi.dValue << ';' - << pi.tWarn.pString() << ';' << pi.tCrit.pString() << ";; " - << '"' << pi.wsFullPath << "\"=" << pi.dValue; + wssPerfData << "\"" << pi.wsFullPath << "\"=" << pi.dValue << ';' + << pi.tWarn.pString() << ';' << pi.tCrit.pString() << ";;"; if (pi.tCrit.rend(pi.dValue)) { std::wcout << "PERFMON CRITICAL \"" << pi.wsFullPath << "\" = "