mirror of
				https://github.com/Icinga/icinga2.git
				synced 2025-11-03 21:25:56 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			133 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			133 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#include "icinga/icingaapplication.hpp"
 | 
						|
#include "icinga/customvarobject.hpp"
 | 
						|
#include "base/array.hpp"
 | 
						|
 | 
						|
namespace icinga
 | 
						|
{
 | 
						|
 | 
						|
code {{{
 | 
						|
/**
 | 
						|
 * The acknowledgement type of a service.
 | 
						|
 *
 | 
						|
 * @ingroup icinga
 | 
						|
 */
 | 
						|
enum AcknowledgementType
 | 
						|
{
 | 
						|
	AcknowledgementNone = 0,
 | 
						|
	AcknowledgementNormal = 1,
 | 
						|
	AcknowledgementSticky = 2
 | 
						|
};
 | 
						|
}}}
 | 
						|
 | 
						|
abstract class Checkable : CustomVarObject
 | 
						|
{
 | 
						|
	[config] Array::Ptr groups {
 | 
						|
		default {{{ return make_shared<Array>(); }}}
 | 
						|
	};
 | 
						|
	[config, protected] String check_command (CheckCommandRaw);
 | 
						|
	[config] int max_check_attempts (MaxCheckAttemptsRaw) {
 | 
						|
		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] double flapping_threshold {
 | 
						|
		default {{{ return 30; }}}
 | 
						|
	};
 | 
						|
	[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; }}}
 | 
						|
	};
 | 
						|
	[config] bool enable_notifications (EnableNotificationsRaw) {
 | 
						|
		default {{{ return true; }}}
 | 
						|
	};
 | 
						|
	[config] bool enable_flapping (EnableFlappingRaw) {
 | 
						|
		default {{{ return true; }}}
 | 
						|
	};
 | 
						|
	[config] bool enable_perfdata (EnablePerfdataRaw) {
 | 
						|
		default {{{ return true; }}}
 | 
						|
	};
 | 
						|
 | 
						|
	[config] String notes;
 | 
						|
	[config] String notes_url;
 | 
						|
	[config] String action_url;
 | 
						|
	[config] String icon_image;
 | 
						|
	[config] String icon_image_alt;
 | 
						|
 | 
						|
	[state] double next_check (NextCheckRaw);
 | 
						|
	[state] int check_attempt {
 | 
						|
		default {{{ return 1; }}}
 | 
						|
	};
 | 
						|
	[state, enum] ServiceState state_raw {
 | 
						|
		default {{{ return ServiceUnknown; }}}
 | 
						|
	};
 | 
						|
	[state, enum] StateType state_type {
 | 
						|
		default {{{ return StateTypeSoft; }}}
 | 
						|
	};
 | 
						|
	[state, enum] ServiceState last_state_raw {
 | 
						|
		default {{{ return ServiceUnknown; }}}
 | 
						|
	};
 | 
						|
	[state, enum] ServiceState last_hard_state_raw {
 | 
						|
		default {{{ return ServiceUnknown; }}}
 | 
						|
	};
 | 
						|
	[state, enum] StateType last_state_type {
 | 
						|
		default {{{ return StateTypeSoft; }}}
 | 
						|
	};
 | 
						|
	[state] bool last_reachable {
 | 
						|
		default {{{ return true; }}}
 | 
						|
	};
 | 
						|
	[state] CheckResult::Ptr last_check_result;
 | 
						|
	[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 {
 | 
						|
		default {{{ return make_shared<Dictionary>(); }}}
 | 
						|
	};
 | 
						|
	[state] Dictionary::Ptr downtimes {
 | 
						|
		default {{{ return make_shared<Dictionary>(); }}}
 | 
						|
	};
 | 
						|
	[state] bool force_next_notification (ForceNextNotificationRaw);
 | 
						|
	[state] int flapping_positive;
 | 
						|
	[state] int flapping_negative;
 | 
						|
	[state] double flapping_last_change;
 | 
						|
	[state] Value override_enable_notifications;
 | 
						|
	[state] Value override_enable_active_checks;
 | 
						|
	[state] Value override_enable_passive_checks;
 | 
						|
	[state] Value override_enable_flapping;
 | 
						|
	[state] Value override_enable_perfdata;
 | 
						|
	[state] Value override_check_interval;
 | 
						|
	[state] Value override_retry_interval;
 | 
						|
	[state] Value override_enable_event_handler;
 | 
						|
	[state] Value override_event_command;
 | 
						|
	[state] Value override_check_command;
 | 
						|
	[state] Value override_max_check_attempts;
 | 
						|
	[state] Value override_check_period;
 | 
						|
};
 | 
						|
 | 
						|
}
 |