mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Add feature stats to 'icinga' check as performance data metrics
This commit is contained in:
parent
cbec910521
commit
b7358334fc
@ -43,7 +43,10 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResul
|
||||
if (interval > 60)
|
||||
interval = 60;
|
||||
|
||||
Array::Ptr perfdata = new Array();
|
||||
/* use feature stats perfdata */
|
||||
std::pair<Dictionary::Ptr, Array::Ptr> feature_stats = CIB::GetFeatureStats();
|
||||
|
||||
Array::Ptr perfdata = feature_stats.second;
|
||||
|
||||
perfdata->Add(new PerfdataValue("active_host_checks", CIB::GetActiveHostChecksStatistics(interval) / interval));
|
||||
perfdata->Add(new PerfdataValue("passive_host_checks", CIB::GetPassiveHostChecksStatistics(interval) / interval));
|
||||
|
Loading…
x
Reference in New Issue
Block a user