]> granicus.if.org Git - icinga2/commitdiff
Expose metric current_pending_callbacks 7421/head
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 14 Aug 2019 15:22:27 +0000 (17:22 +0200)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 14 Aug 2019 15:22:27 +0000 (17:22 +0200)
lib/icinga/cib.cpp
lib/methods/icingachecktask.cpp

index b378bcd6fbecaf7d6f8348c8459958bfbfb7d55a..555079ec9d12983c5b94d1691807754a77950831 100644 (file)
@@ -4,6 +4,7 @@
 #include "icinga/host.hpp"
 #include "icinga/service.hpp"
 #include "icinga/clusterevents.hpp"
+#include "base/application.hpp"
 #include "base/objectlock.hpp"
 #include "base/utility.hpp"
 #include "base/perfdatavalue.hpp"
@@ -292,6 +293,7 @@ void CIB::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata) {
        // Checker related stats
        status->Set("remote_check_queue", ClusterEvents::GetCheckRequestQueueSize());
        status->Set("current_concurrent_checks", Checkable::GetPendingChecks());
+       status->Set("current_pending_callbacks", Application::GetTP().GetPending());
 
        CheckableCheckStatistics scs = CalculateServiceCheckStats();
 
index e67d1ff94304be1929a35bce20805e70e26e792a..4b7d0da01eb35acc8743fd0b513afaffbbc074c4 100644 (file)
@@ -75,6 +75,7 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
        perfdata->Add(new PerfdataValue("active_service_checks_15min", CIB::GetActiveServiceChecksStatistics(60 * 15)));
        perfdata->Add(new PerfdataValue("passive_service_checks_15min", CIB::GetPassiveServiceChecksStatistics(60 * 15)));
 
+       perfdata->Add(new PerfdataValue("current_pending_callbacks", Application::GetTP().GetPending()));
        perfdata->Add(new PerfdataValue("current_concurrent_checks", Checkable::GetPendingChecks()));
        perfdata->Add(new PerfdataValue("remote_check_queue", ClusterEvents::GetCheckRequestQueueSize()));