From: Gunnar Beutner Date: Mon, 2 Jul 2012 13:08:54 +0000 (+0200) Subject: Added freshness_interval config setting. X-Git-Tag: v0.0.1~330 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a0cae862aff8c4a53a421afcdb568224b9924c1;p=icinga2 Added freshness_interval config setting. --- diff --git a/cib/service.cpp b/cib/service.cpp index 60837c6c9..495341068 100644 --- a/cib/service.cpp +++ b/cib/service.cpp @@ -84,6 +84,15 @@ long Service::GetRetryInterval(void) const return value; } +long Service::GetFreshnessInterval(void) const +{ + long value; + if (!GetConfigObject()->GetProperty("freshness_interval", &value)); + value = GetCheckInterval() * 3; + + return value; +} + Dictionary::Ptr Service::GetDependencies(void) const { Dictionary::Ptr value; diff --git a/cib/service.h b/cib/service.h index 383dd2698..8e7874348 100644 --- a/cib/service.h +++ b/cib/service.h @@ -40,6 +40,7 @@ public: long GetMaxCheckAttempts(void) const; long GetCheckInterval(void) const; long GetRetryInterval(void) const; + long GetFreshnessInterval(void) const; Dictionary::Ptr GetDependencies(void) const; Dictionary::Ptr GetGroups(void) const;