]> granicus.if.org Git - icinga2/commitdiff
ido: Add missing check_type for host/service status tables.
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 9 Aug 2013 10:35:42 +0000 (12:35 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 9 Aug 2013 10:35:42 +0000 (12:35 +0200)
refs #4380

lib/icinga/compatutility.cpp
lib/ido/hostdbobject.cpp
lib/ido/servicedbobject.cpp

index c6c54b1951aa5df59a11482a992e6e2c50c5bfe4..a5237823b94eb028e4766e5af7cce9571f1a0222 100644 (file)
@@ -268,6 +268,7 @@ Dictionary::Ptr CompatUtility::GetServiceStatusAttributes(const Service::Ptr& se
        attr->Set("plugin_output", output);
        attr->Set("long_plugin_output", long_output);
        attr->Set("performance_data", perfdata);
+       attr->Set("check_type", (service->GetEnableActiveChecks() ? 1 : 0));
        attr->Set("last_check", schedule_end);
        attr->Set("next_check", service->GetNextCheck());
        attr->Set("current_attempt", service->GetCurrentCheckAttempt());
index 97baad40bc520cc1f1cde8b3f8ccbf06bca67272..a245341aa64c8eaab6b3798e6c5ba52de9beb88b 100644 (file)
@@ -144,7 +144,7 @@ Dictionary::Ptr HostDbObject::GetStatusFields(void) const
                fields->Set("max_check_attempts", attrs->Get("max_attempts"));
                fields->Set("last_check", DbValue::FromTimestamp(attrs->Get("last_check")));
                fields->Set("next_check", DbValue::FromTimestamp(attrs->Get("next_check")));
-               fields->Set("check_type", Empty);
+               fields->Set("check_type", attrs->Get("check_type"));
                fields->Set("last_state_change", DbValue::FromTimestamp(attrs->Get("last_state_change")));
                fields->Set("last_hard_state_change", DbValue::FromTimestamp(attrs->Get("last_hard_state_change")));
                fields->Set("last_time_up", DbValue::FromTimestamp(attrs->Get("last_time_up")));
index 30042bca92289c26eac5f1505ff33a317201ad8d..cba8fefcaf0e00b92bf6ae0d2c95cf72afb28340 100644 (file)
@@ -135,7 +135,7 @@ Dictionary::Ptr ServiceDbObject::GetStatusFields(void) const
        fields->Set("max_check_attempts", attrs->Get("max_attempts"));
        fields->Set("last_check", DbValue::FromTimestamp(attrs->Get("last_check")));
        fields->Set("next_check", DbValue::FromTimestamp(attrs->Get("next_check")));
-       fields->Set("check_type", Empty);
+       fields->Set("check_type", attrs->Get("check_type"));
        fields->Set("last_state_change", DbValue::FromTimestamp(attrs->Get("last_state_change")));
        fields->Set("last_hard_state_change", DbValue::FromTimestamp(attrs->Get("last_hard_state_change")));
        fields->Set("last_time_ok", DbValue::FromTimestamp(attrs->Get("last_time_ok")));