vararg_constructor class DateTime
{
- [state, no_storage] double value {
+ [state, no_storage] Timestamp value {
get;
};
};
namespace icinga
{
+typedef double Timestamp;
+
/**
* The type of a Value.
*
[config] String icon_image;
[config] String icon_image_alt;
- [state] double next_check;
+ [state] Timestamp next_check;
[state] int check_attempt {
default {{{ return 1; }}}
};
default {{{ return true; }}}
};
[state] CheckResult::Ptr last_check_result;
- [state] double last_state_change {
+ [state] Timestamp last_state_change {
default {{{ return Application::GetStartTime(); }}}
};
- [state] double last_hard_state_change {
+ [state] Timestamp last_hard_state_change {
default {{{ return Application::GetStartTime(); }}}
};
- [state] double last_state_unreachable;
+ [state] Timestamp last_state_unreachable;
[state] bool last_in_downtime;
[state] bool force_next_check;
[state] int acknowledgement (AcknowledgementRaw) {
default {{{ return AcknowledgementNone; }}}
};
- [state] double acknowledgement_expiry;
+ [state] Timestamp acknowledgement_expiry;
[state] bool force_next_notification;
[state] int flapping_positive;
[state] int flapping_negative;
- [state] double flapping_last_change;
+ [state] Timestamp flapping_last_change;
[no_storage, protected] bool flapping {
get {{{ return false; }}}
};
- [no_storage] double last_check {
+ [no_storage] Timestamp last_check {
get;
};
class CheckResult
{
- [state] double schedule_start;
- [state] double schedule_end;
- [state] double execution_start;
- [state] double execution_end;
+ [state] Timestamp schedule_start;
+ [state] Timestamp schedule_end;
+ [state] Timestamp execution_start;
+ [state] Timestamp execution_end;
[state] Value command;
[state] int exit_status;
}}}
};
- [config] double entry_time {
+ [config] Timestamp entry_time {
default {{{ return Utility::GetTime(); }}}
};
[config, enum] CommentType entry_type {
};
[config, required] String author;
[config, required] String text;
- [config] double expire_time;
+ [config] Timestamp expire_time;
[state] int legacy_id;
};
}}}
};
- [config] double entry_time {
+ [config] Timestamp entry_time {
default {{{ return Utility::GetTime(); }}}
};
[config, required] String author;
[config, required] String comment;
- [config] double start_time;
- [config] double end_time;
- [state] double trigger_time;
+ [config] Timestamp start_time;
+ [config] Timestamp end_time;
+ [state] Timestamp trigger_time;
[config] bool fixed;
- [config] double duration;
+ [config] Timestamp duration;
[config] name(Downtime) triggered_by;
[config] String scheduled_by;
[state] Array::Ptr triggers {
*result = StateTypeToString(GetLastStateType());
return true;
} else if (macro == "last_state_change") {
- *result = GetLastStateChange();
+ *result = static_cast<long>(GetLastStateChange());
return true;
} else if (macro == "downtime_depth") {
*result = GetDowntimeDepth();
[enum, no_storage] HostState last_hard_state {
get;
};
- [state] double last_state_up;
- [state] double last_state_down;
+ [state] Timestamp last_state_up;
+ [state] Timestamp last_state_down;
};
}
}
ref = object->GetField(field);
+
+ Field fieldInfo = type->GetFieldInfo(field);
+
+ if (strcmp(fieldInfo.TypeName, "Timestamp") == 0)
+ ref = static_cast<long>(ref);
}
}
default {{{ return new Array(); }}}
};
- [state] double last_notification;
- [state] double next_notification;
+ [state] Timestamp last_notification;
+ [state] Timestamp next_notification;
[state] int notification_number;
- [state] double last_problem_notification;
+ [state] Timestamp last_problem_notification;
[config, navigation] name(Endpoint) command_endpoint (CommandEndpointRaw) {
navigate {{{
*result = StateTypeToString(GetLastStateType());
return true;
} else if (macro == "last_state_change") {
- *result = GetLastStateChange();
+ *result = static_cast<long>(GetLastStateChange());
return true;
} else if (macro == "downtime_depth") {
*result = GetDowntimeDepth();
return GetLastHardStateRaw();
}}}
};
- [state] double last_state_ok (LastStateOK);
- [state] double last_state_warning;
- [state] double last_state_critical;
- [state] double last_state_unknown;
+ [state] Timestamp last_state_ok (LastStateOK);
+ [state] Timestamp last_state_warning;
+ [state] Timestamp last_state_critical;
+ [state] Timestamp last_state_unknown;
};
}
default {{{ return true; }}}
};
- [state] double last_notification;
+ [state] Timestamp last_notification;
};
}
[config] String ticket_salt;
- [state, no_user_modify] double log_message_timestamp;
+ [state, no_user_modify] Timestamp log_message_timestamp;
[no_user_modify] String identity;
};
default {{{ return 86400; }}}
};
- [state] double local_log_position;
- [state] double remote_log_position;
+ [state] Timestamp local_log_position;
+ [state] Timestamp remote_log_position;
[no_user_modify] bool connecting;
[no_user_modify] bool syncing;