]> granicus.if.org Git - icinga2/blobdiff - plugins/check_perfmon.cpp
Enhance the addon chapter in the docs
[icinga2] / plugins / check_perfmon.cpp
index 7e415f1cdb0e6972f46afbe3c4e495fd9a7bdc3d..e9d44cf55e3f1a9358504578642de74b313a43e1 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
+ * Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/)      *
  *                                                                            *
  * This program is free software; you can redistribute it and/or              *
  * modify it under the terms of the GNU General Public License                *
@@ -352,26 +352,27 @@ static int printOutput(const po::variables_map& vm, printInfoStruct& pi)
        std::wstringstream wssPerfData;
 
        if (vm.count("perf-syntax"))
-               wssPerfData << "\"" << vm["perf-syntax"].as<std::wstring>() << "\"=";
+               wssPerfData << "'" << vm["perf-syntax"].as<std::wstring>() << "'=";
        else
-               wssPerfData << "\"" << pi.wsFullPath << "\"=";
+               wssPerfData << "'" << pi.wsFullPath << "'=";
 
        wssPerfData << pi.dValue << ';' << pi.tWarn.pString() << ';' << pi.tCrit.pString() << ";;";
 
        if (pi.tCrit.rend(pi.dValue)) {
-               std::wcout << "PERFMON CRITICAL \"" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
-                       << "\" = " << pi.dValue << " | " << wssPerfData.str() << '\n';
+               std::wcout << "PERFMON CRITICAL for '" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
+                       << "' = " << pi.dValue << " | " << wssPerfData.str() << "\n";
                return 2;
        }
 
        if (pi.tWarn.rend(pi.dValue)) {
-               std::wcout << "PERFMON WARNING \"" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
-                       << "\" = " << pi.dValue << " | " << wssPerfData.str() << '\n';
+               std::wcout << "PERFMON WARNING for '" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
+                       << "' = " << pi.dValue << " | " << wssPerfData.str() << "\n";
                return 1;
        }
 
-       std::wcout << "PERFMON OK \"" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
-               << "\" = " << pi.dValue << " | " << wssPerfData.str() << '\n';
+       std::wcout << "PERFMON OK for '" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
+               << "' = " << pi.dValue << " | " << wssPerfData.str() << "\n";
+
        return 0;
 }