]> granicus.if.org Git - icinga2/commitdiff
Ignore check results if we have a local result that's newer.
authorGunnar Beutner <gunnar@beutner.name>
Thu, 12 Sep 2013 15:39:29 +0000 (17:39 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 12 Sep 2013 15:39:29 +0000 (17:39 +0200)
lib/icinga/service-check.cpp

index 679cbd4aa971d4cbcf6bfa379b5ccefd6c41ca44..763f7886a889741c5374faaebcaa427041d588ff 100644 (file)
@@ -472,6 +472,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr, const String& author
        long old_attempt = GetCurrentCheckAttempt();
        bool recovery;
 
+       if (old_cr && cr->Get("execution_start") < old_cr->Get("execution_start"))
+               return;
+
        /* The ExecuteCheck function already sets the old state, but we need to do it again
         * in case this was a passive check result. */
        SetLastState(old_state);