2013-10-26 09:41:45 +02:00
|
|
|
#include "icinga/host.h"
|
|
|
|
#include "icinga/icingaapplication.h"
|
|
|
|
#include "base/dynamicobject.h"
|
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
code {{{
|
|
|
|
/**
|
|
|
|
* The acknowledgement type of a service.
|
|
|
|
*
|
|
|
|
* @ingroup icinga
|
|
|
|
*/
|
|
|
|
enum AcknowledgementType
|
|
|
|
{
|
|
|
|
AcknowledgementNone = 0,
|
|
|
|
AcknowledgementNormal = 1,
|
|
|
|
AcknowledgementSticky = 2
|
|
|
|
};
|
|
|
|
}}}
|
|
|
|
|
|
|
|
class Service : DynamicObject
|
|
|
|
{
|
|
|
|
[config] String display_name {
|
|
|
|
get {{{
|
|
|
|
if (m_DisplayName.IsEmpty())
|
|
|
|
return GetShortName();
|
|
|
|
else
|
|
|
|
return m_DisplayName;
|
|
|
|
}}}
|
|
|
|
};
|
|
|
|
[config] Dictionary::Ptr macros;
|
|
|
|
[config] Array::Ptr host_dependencies;
|
|
|
|
[config] Array::Ptr service_dependencies;
|
|
|
|
[config] Array::Ptr groups;
|
|
|
|
[config, protected] String check_command (CheckCommandRaw);
|
2013-11-26 13:27:41 +01:00
|
|
|
[config] int max_check_attempts (MaxCheckAttemptsRaw) {
|
2013-10-26 09:41:45 +02:00
|
|
|
default {{{ return 3; }}}
|
|
|
|
};
|
|
|
|
[config, protected] String check_period (CheckPeriodRaw);
|
|
|
|
[config] double check_interval (CheckIntervalRaw) {
|
|
|
|
default {{{ return 5 * 60; }}}
|
|
|
|
};
|
|
|
|
[config] double retry_interval (RetryIntervalRaw) {
|
|
|
|
default {{{ return 60; }}}
|
|
|
|
};
|
|
|
|
[config] String event_command (EventCommandRaw);
|
|
|
|
[config] bool volatile;
|
|
|
|
[config] String short_name {
|
2013-10-30 09:55:00 +01:00
|
|
|
get {{{
|
|
|
|
if (m_ShortName.IsEmpty())
|
|
|
|
return GetName();
|
|
|
|
else
|
|
|
|
return m_ShortName;
|
|
|
|
}}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
|
|
|
[config] String host (HostRaw);
|
|
|
|
[config] double flapping_threshold {
|
|
|
|
default {{{ return 30; }}}
|
|
|
|
};
|
|
|
|
[config] Dictionary::Ptr notifications (NotificationDescriptions);
|
2013-11-13 14:56:31 +01:00
|
|
|
[config] Dictionary::Ptr scheduled_downtimes (ScheduledDowntimeDescriptions);
|
2013-10-26 09:41:45 +02:00
|
|
|
[config] bool enable_active_checks (EnableActiveChecksRaw) {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
|
|
|
[config] bool enable_passive_checks (EnablePassiveChecksRaw) {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
|
|
|
[config] bool enable_event_handler (EnableEventHandlerRaw) {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
2013-11-26 11:18:05 +01:00
|
|
|
[config] bool enable_notifications (EnableNotificationsRaw) {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
2013-11-26 11:34:33 +01:00
|
|
|
[config] bool enable_flapping (EnableFlappingRaw) {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
2013-11-26 11:51:06 +01:00
|
|
|
[config] bool enable_perfdata (EnablePerfdataRaw) {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
2013-10-26 09:41:45 +02:00
|
|
|
|
|
|
|
[state] double next_check (NextCheckRaw);
|
|
|
|
[state] int check_attempt {
|
|
|
|
default {{{ return 1; }}}
|
|
|
|
};
|
|
|
|
[state, enum] ServiceState "state" {
|
|
|
|
default {{{ return StateUnknown; }}}
|
|
|
|
};
|
|
|
|
[state, enum] StateType state_type {
|
|
|
|
default {{{ return StateTypeSoft; }}}
|
|
|
|
};
|
|
|
|
[state, enum] ServiceState last_state {
|
|
|
|
default {{{ return StateUnknown; }}}
|
|
|
|
};
|
|
|
|
[state, enum] ServiceState last_hard_state {
|
|
|
|
default {{{ return StateUnknown; }}}
|
|
|
|
};
|
|
|
|
[state, enum] StateType last_state_type {
|
|
|
|
default {{{ return StateTypeSoft; }}}
|
|
|
|
};
|
|
|
|
[state] bool last_reachable {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
2013-11-09 14:22:38 +01:00
|
|
|
[state] CheckResult::Ptr last_check_result;
|
2013-10-26 09:41:45 +02:00
|
|
|
[state] double last_state_change {
|
|
|
|
default {{{ return Application::GetStartTime(); }}}
|
|
|
|
};
|
|
|
|
[state] double last_hard_state_change {
|
|
|
|
default {{{ return Application::GetStartTime(); }}}
|
|
|
|
};
|
|
|
|
[state] double last_state_ok (LastStateOK);
|
|
|
|
[state] double last_state_warning;
|
|
|
|
[state] double last_state_critical;
|
|
|
|
[state] double last_state_unknown;
|
|
|
|
[state] double last_state_unreachable;
|
|
|
|
[state] bool last_in_downtime;
|
|
|
|
[state] bool force_next_check (ForceNextCheckRaw);
|
|
|
|
[state] int acknowledgement (AcknowledgementRaw) {
|
|
|
|
default {{{ return AcknowledgementNone; }}}
|
|
|
|
};
|
|
|
|
[state] double acknowledgement_expiry;
|
|
|
|
[state] Dictionary::Ptr comments {
|
2013-11-06 08:51:56 +01:00
|
|
|
default {{{ return make_shared<Dictionary>(); }}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
|
|
|
[state] Dictionary::Ptr downtimes {
|
2013-11-06 08:51:56 +01:00
|
|
|
default {{{ return make_shared<Dictionary>(); }}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
|
|
|
[state] bool force_next_notification (ForceNextNotificationRaw);
|
|
|
|
[state] int flapping_positive;
|
|
|
|
[state] int flapping_negative;
|
|
|
|
[state] double flapping_last_change;
|
2013-11-26 11:18:05 +01:00
|
|
|
[state] Value override_enable_notifications;
|
2013-10-26 09:41:45 +02:00
|
|
|
[state] Value override_enable_active_checks;
|
|
|
|
[state] Value override_enable_passive_checks;
|
2013-11-26 11:34:33 +01:00
|
|
|
[state] Value override_enable_flapping;
|
2013-11-26 11:51:06 +01:00
|
|
|
[state] Value override_enable_perfdata;
|
2013-10-26 09:41:45 +02:00
|
|
|
[state] Value override_check_interval;
|
|
|
|
[state] Value override_retry_interval;
|
|
|
|
[state] Value override_enable_event_handler;
|
2013-11-26 12:31:17 +01:00
|
|
|
[state] Value override_event_command;
|
2013-11-26 12:56:42 +01:00
|
|
|
[state] Value override_check_command;
|
2013-11-26 13:27:41 +01:00
|
|
|
[state] Value override_max_check_attempts;
|
2013-11-26 13:43:56 +01:00
|
|
|
[state] Value override_check_period;
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|