[icinga-checkins] icinga.org: icinga2/feature/checks-5049: Add check statistics.

git at icinga.org git at icinga.org
Sun Nov 10 17:47:59 CET 2013


Module: icinga2
Branch: feature/checks-5049
Commit: ca9b31d4f08071009dabda5838701ba046eeb4a8
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=ca9b31d4f08071009dabda5838701ba046eeb4a8

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Sun Nov 10 17:47:47 2013 +0100

Add check statistics.

Refs #5049

---

 components/checker/checkercomponent.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp
index 9d806ca..34921a6 100644
--- a/components/checker/checkercomponent.cpp
+++ b/components/checker/checkercomponent.cpp
@@ -19,6 +19,7 @@
 
 #include "checker/checkercomponent.h"
 #include "icinga/icingaapplication.h"
+#include "icinga/cib.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/utility.h"
@@ -183,7 +184,7 @@ void CheckerComponent::ResultTimerHandler(void)
 	{
 		boost::mutex::scoped_lock lock(m_Mutex);
 
-		msgbuf << "Pending services: " << m_PendingServices.size() << "; Idle services: " << m_IdleServices.size();
+		msgbuf << "Pending services: " << m_PendingServices.size() << "; Idle services: " << m_IdleServices.size() << "; Checks/s: " << CIB::GetActiveChecksStatistics(5) / 5.0;
 	}
 
 	Log(LogInformation, "checker", msgbuf.str());





More information about the icinga-checkins mailing list