2014-10-17 19:44:31 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
2017-01-10 15:54:22 +01:00
|
|
|
* Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
|
2014-10-17 19:44:31 +02:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License *
|
|
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
|
|
* of the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the Free Software Foundation *
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
******************************************************************************/
|
|
|
|
|
2015-08-04 14:47:44 +02:00
|
|
|
library icinga;
|
|
|
|
|
2013-11-09 14:22:38 +01:00
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
code {{{
|
2014-04-07 13:59:41 +02:00
|
|
|
/**
|
|
|
|
* The state of a host.
|
|
|
|
*
|
|
|
|
* @ingroup icinga
|
|
|
|
*/
|
|
|
|
enum HostState
|
|
|
|
{
|
|
|
|
HostUp = 0,
|
2014-04-08 08:54:49 +02:00
|
|
|
HostDown = 1
|
2014-04-07 13:59:41 +02:00
|
|
|
};
|
|
|
|
|
2013-11-09 14:22:38 +01:00
|
|
|
/**
|
|
|
|
* The state of a service.
|
|
|
|
*
|
|
|
|
* @ingroup icinga
|
|
|
|
*/
|
|
|
|
enum ServiceState
|
|
|
|
{
|
2014-04-08 09:11:54 +02:00
|
|
|
ServiceOK = 0,
|
|
|
|
ServiceWarning = 1,
|
|
|
|
ServiceCritical = 2,
|
|
|
|
ServiceUnknown = 3
|
2013-11-09 14:22:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The state type of a host or service.
|
|
|
|
*
|
|
|
|
* @ingroup icinga
|
|
|
|
*/
|
|
|
|
enum StateType
|
|
|
|
{
|
|
|
|
StateTypeSoft = 0,
|
|
|
|
StateTypeHard = 1
|
|
|
|
};
|
|
|
|
}}}
|
|
|
|
|
2014-10-25 09:14:56 +02:00
|
|
|
class CheckResult
|
2013-11-09 14:22:38 +01:00
|
|
|
{
|
2016-06-21 11:29:12 +02:00
|
|
|
[state] Timestamp schedule_start;
|
|
|
|
[state] Timestamp schedule_end;
|
|
|
|
[state] Timestamp execution_start;
|
|
|
|
[state] Timestamp execution_end;
|
2013-11-09 14:22:38 +01:00
|
|
|
|
2013-11-10 01:29:09 +01:00
|
|
|
[state] Value command;
|
2013-11-09 14:22:38 +01:00
|
|
|
[state] int exit_status;
|
|
|
|
|
|
|
|
[state, enum] ServiceState "state";
|
|
|
|
[state] String output;
|
2014-09-17 15:38:39 +02:00
|
|
|
[state] Array::Ptr performance_data;
|
2013-11-09 14:22:38 +01:00
|
|
|
|
|
|
|
[state] bool active {
|
|
|
|
default {{{ return true; }}}
|
|
|
|
};
|
|
|
|
|
|
|
|
[state] String check_source;
|
|
|
|
|
|
|
|
[state] Dictionary::Ptr vars_before;
|
|
|
|
[state] Dictionary::Ptr vars_after;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|