2019-02-25 08:48:22 -05:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2014-10-17 13:44:31 -04:00
|
|
|
|
2015-08-04 08:47:44 -04:00
|
|
|
library icinga;
|
|
|
|
|
|
2013-11-09 08:22:38 -05:00
|
|
|
namespace icinga
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
code {{{
|
2014-04-07 07:59:41 -04:00
|
|
|
/**
|
|
|
|
|
* The state of a host.
|
|
|
|
|
*
|
|
|
|
|
* @ingroup icinga
|
|
|
|
|
*/
|
|
|
|
|
enum HostState
|
|
|
|
|
{
|
|
|
|
|
HostUp = 0,
|
2014-04-08 02:54:49 -04:00
|
|
|
HostDown = 1
|
2014-04-07 07:59:41 -04:00
|
|
|
};
|
|
|
|
|
|
2013-11-09 08:22:38 -05:00
|
|
|
/**
|
|
|
|
|
* The state of a service.
|
|
|
|
|
*
|
|
|
|
|
* @ingroup icinga
|
|
|
|
|
*/
|
|
|
|
|
enum ServiceState
|
|
|
|
|
{
|
2014-04-08 03:11:54 -04:00
|
|
|
ServiceOK = 0,
|
|
|
|
|
ServiceWarning = 1,
|
|
|
|
|
ServiceCritical = 2,
|
|
|
|
|
ServiceUnknown = 3
|
2013-11-09 08:22:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The state type of a host or service.
|
|
|
|
|
*
|
|
|
|
|
* @ingroup icinga
|
|
|
|
|
*/
|
|
|
|
|
enum StateType
|
|
|
|
|
{
|
|
|
|
|
StateTypeSoft = 0,
|
|
|
|
|
StateTypeHard = 1
|
|
|
|
|
};
|
|
|
|
|
}}}
|
|
|
|
|
|
2014-10-25 03:14:56 -04:00
|
|
|
class CheckResult
|
2013-11-09 08:22:38 -05:00
|
|
|
{
|
2016-06-21 05:29:12 -04:00
|
|
|
[state] Timestamp schedule_start;
|
|
|
|
|
[state] Timestamp schedule_end;
|
|
|
|
|
[state] Timestamp execution_start;
|
|
|
|
|
[state] Timestamp execution_end;
|
2013-11-09 08:22:38 -05:00
|
|
|
|
2013-11-09 19:29:09 -05:00
|
|
|
[state] Value command;
|
2013-11-09 08:22:38 -05:00
|
|
|
[state] int exit_status;
|
|
|
|
|
|
|
|
|
|
[state, enum] ServiceState "state";
|
2022-01-10 13:18:11 -05:00
|
|
|
[state, enum] ServiceState previous_hard_state;
|
2013-11-09 08:22:38 -05:00
|
|
|
[state] String output;
|
2014-09-17 09:38:39 -04:00
|
|
|
[state] Array::Ptr performance_data;
|
2013-11-09 08:22:38 -05:00
|
|
|
|
|
|
|
|
[state] bool active {
|
|
|
|
|
default {{{ return true; }}}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
[state] String check_source;
|
2021-07-20 05:10:26 -04:00
|
|
|
[state] String scheduling_source;
|
2018-01-11 11:10:46 -05:00
|
|
|
[state] double ttl;
|
2013-11-09 08:22:38 -05:00
|
|
|
|
|
|
|
|
[state] Dictionary::Ptr vars_before;
|
|
|
|
|
[state] Dictionary::Ptr vars_after;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|