]> granicus.if.org Git - icinga2/commitdiff
Warn about latency issues.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Jun 2012 13:23:31 +0000 (15:23 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Jun 2012 13:24:47 +0000 (15:24 +0200)
components/checker/checkercomponent.cpp

index 2122759008d7620341d4c381208f2f8adc4fb514..69bed96401e3c509fbed9a30c4de845e4437a880 100644 (file)
@@ -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());