1/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ 2 3library icinga; 4 5namespace icinga 6{ 7 8code {{{ 9/** 10 * The state of a host. 11 * 12 * @ingroup icinga 13 */ 14enum HostState 15{ 16 HostUp = 0, 17 HostDown = 1 18}; 19 20/** 21 * The state of a service. 22 * 23 * @ingroup icinga 24 */ 25enum ServiceState 26{ 27 ServiceOK = 0, 28 ServiceWarning = 1, 29 ServiceCritical = 2, 30 ServiceUnknown = 3 31}; 32 33/** 34 * The state type of a host or service. 35 * 36 * @ingroup icinga 37 */ 38enum StateType 39{ 40 StateTypeSoft = 0, 41 StateTypeHard = 1 42}; 43}}} 44 45class CheckResult 46{ 47 [state] Timestamp schedule_start; 48 [state] Timestamp schedule_end; 49 [state] Timestamp execution_start; 50 [state] Timestamp execution_end; 51 52 [state] Value command; 53 [state] int exit_status; 54 55 [state, enum] ServiceState "state"; 56 [state] String output; 57 [state] Array::Ptr performance_data; 58 59 [state] bool active { 60 default {{{ return true; }}} 61 }; 62 63 [state] String check_source; 64 [state] String scheduling_source; 65 [state] double ttl; 66 67 [state] Dictionary::Ptr vars_before; 68 [state] Dictionary::Ptr vars_after; 69}; 70 71} 72