]> granicus.if.org Git - icinga2/commitdiff
Fix missing stats for current_concurrent_checks via REST API 7400/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Tue, 6 Aug 2019 12:51:10 +0000 (14:51 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Tue, 6 Aug 2019 12:51:10 +0000 (14:51 +0200)
It was added inside the 'icinga' check task, but not for the REST API.
Thanks for asking, @Thomas-Gelf

lib/icinga/cib.cpp

index bed01e22a1e90291f4cd09598d113ba8703e8e16..b378bcd6fbecaf7d6f8348c8459958bfbfb7d55a 100644 (file)
@@ -289,7 +289,9 @@ void CIB::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata) {
        status->Set("active_service_checks_15min", GetActiveServiceChecksStatistics(60 * 15));
        status->Set("passive_service_checks_15min", GetPassiveServiceChecksStatistics(60 * 15));
 
+       // Checker related stats
        status->Set("remote_check_queue", ClusterEvents::GetCheckRequestQueueSize());
+       status->Set("current_concurrent_checks", Checkable::GetPendingChecks());
 
        CheckableCheckStatistics scs = CalculateServiceCheckStats();