From: Gunnar Beutner Date: Wed, 20 Jun 2012 13:23:31 +0000 (+0200) Subject: Warn about latency issues. X-Git-Tag: v0.0.1~392 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee2c14414c0e1ed5b560cd4fa6963decd79d1d81;p=icinga2 Warn about latency issues. --- diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index 212275900..69bed9640 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -130,6 +130,12 @@ void CheckerComponent::ResultTimerHandler(void) m_Services.push(service); } + if (min_latency > 5) { + stringstream latwarn; + latwarn << "We can't keep up with the checks: minimum latency is " << min_latency << " seconds"; + Application::Log(LogWarning, "checker", latwarn.str()); + } + stringstream msgbuf; msgbuf << "ResultTimerHandler: " << results << " results (" << failed << " failed); latency: avg=" << avg_latency / (results ? results : 1) << ", min=" << min_latency << ", max: " << max_latency; Application::Log(LogInformation, "checker", msgbuf.str());