]> granicus.if.org Git - icinga2/commitdiff
Add counter for current concurrent checks to Icinga check 6136/head
authorNoah Hilverling <noah.hilverling@icinga.com>
Thu, 1 Mar 2018 14:01:47 +0000 (15:01 +0100)
committerNoah Hilverling <noah.hilverling@icinga.com>
Thu, 1 Mar 2018 14:01:55 +0000 (15:01 +0100)
fixes #4939

lib/methods/icingachecktask.cpp

index 5eca99b3faa0a166c899ad7e653b614c4ac14cf4..fa985d6125ae70a94f851549d9dce181cc9573fa 100644 (file)
@@ -24,6 +24,7 @@
 #include "icinga/macroprocessor.hpp"
 #include "icinga/icingaapplication.hpp"
 #include "icinga/clusterevents.hpp"
+#include "icinga/checkable.hpp"
 #include "base/application.hpp"
 #include "base/objectlock.hpp"
 #include "base/utility.hpp"
@@ -88,6 +89,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_concurrent_checks", Checkable::GetPendingChecks()));
        perfdata->Add(new PerfdataValue("remote_check_queue", ClusterEvents::GetCheckRequestQueueSize()));
 
        CheckableCheckStatistics scs = CIB::CalculateServiceCheckStats();