mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-07 20:25:08 +02:00
parent
80778bad1d
commit
4a32ca9123
File diff suppressed because it is too large
Load Diff
@ -39,18 +39,10 @@ public:
|
||||
static boost::signals2::signal<void (double, const String&, const std::vector<String>&)> OnNewExternalCommand;
|
||||
|
||||
private:
|
||||
typedef boost::function<void (double time, const std::vector<String>& arguments)> Callback;
|
||||
|
||||
static boost::once_flag m_InitializeOnce;
|
||||
static boost::mutex m_Mutex;
|
||||
static std::map<String, Callback> m_Commands;
|
||||
|
||||
ExternalCommandProcessor(void);
|
||||
|
||||
static void Initialize(void);
|
||||
|
||||
static void RegisterCommand(const String& command, const Callback& callback);
|
||||
|
||||
static void ProcessHostCheckResult(double time, const std::vector<String>& arguments);
|
||||
static void ProcessServiceCheckResult(double time, const std::vector<String>& arguments);
|
||||
static void ScheduleHostCheck(double time, const std::vector<String>& arguments);
|
||||
|
@ -141,12 +141,18 @@ String PluginUtility::FormatPerfdata(const Value& perfdata)
|
||||
|
||||
bool first = true;
|
||||
BOOST_FOREACH(const Dictionary::Pair& kv, dict) {
|
||||
String key;
|
||||
if (kv.first.FindFirstOf(" ") != String::NPos)
|
||||
key = "'" + kv.first + "'";
|
||||
else
|
||||
key = kv.first;
|
||||
|
||||
if (!first)
|
||||
result << " ";
|
||||
else
|
||||
first = false;
|
||||
|
||||
result << kv.first << "=" << PerfdataValue::Format(kv.second);
|
||||
result << key << "=" << PerfdataValue::Format(kv.second);
|
||||
}
|
||||
|
||||
return result.str();
|
||||
|
Loading…
x
Reference in New Issue
Block a user