]> granicus.if.org Git - icinga2/commitdiff
Added freshness_interval config setting.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 2 Jul 2012 13:08:54 +0000 (15:08 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 2 Jul 2012 13:08:54 +0000 (15:08 +0200)
cib/service.cpp
cib/service.h

index 60837c6c963f74b70772f5cec622cc1c1bc86efb..4953410686e85563eb62cc1e16da5b68780a0cff 100644 (file)
@@ -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;
index 383dd2698e130ec62bac3c2235875ed78fa3fd91..8e7874348e1b6458fbd4cfbf59523b7a39372a73 100644 (file)
@@ -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;