Expose metric current_pending_callbacks

This commit is contained in:
Alexander A. Klimov 2019-08-14 17:22:27 +02:00
parent a58a5feee3
commit 448a991404
2 changed files with 3 additions and 0 deletions

View 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();

View 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()));