mirror of https://github.com/Icinga/icinga2.git
Fix empty perf data strings
This commit is contained in:
parent
446796dadb
commit
e90fb43b91
|
@ -677,8 +677,10 @@ Dictionary::Ptr RedisWriter::SerializeState(const Checkable::Ptr& checkable)
|
|||
}
|
||||
}
|
||||
|
||||
if (cr->GetPerformanceData())
|
||||
attrs->Set("performance_data", PluginUtility::FormatPerfdata(cr->GetPerformanceData()));
|
||||
String perfData = PluginUtility::FormatPerfdata(cr->GetPerformanceData());
|
||||
if (!perfData.IsEmpty())
|
||||
attrs->Set("performance_data", perfData);
|
||||
|
||||
if (!cr->GetCommand().IsEmpty())
|
||||
attrs->Set("commandline", FormatCommandLine(cr->GetCommand()));
|
||||
attrs->Set("execution_time", cr->CalculateExecutionTime());
|
||||
|
|
Loading…
Reference in New Issue