"Fossies" - the Fresh Open Source Software Archive

Member "icinga2-2.10.5/lib/icinga/host.ti" (23 May 2019, 2224 Bytes) of package /linux/misc/icinga2-2.10.5.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "host.ti": 2.10.0_vs_2.10.1.

    1 /******************************************************************************
    2  * Icinga 2                                                                   *
    3  * Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/)      *
    4  *                                                                            *
    5  * This program is free software; you can redistribute it and/or              *
    6  * modify it under the terms of the GNU General Public License                *
    7  * as published by the Free Software Foundation; either version 2             *
    8  * of the License, or (at your option) any later version.                     *
    9  *                                                                            *
   10  * This program is distributed in the hope that it will be useful,            *
   11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
   12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
   13  * GNU General Public License for more details.                               *
   14  *                                                                            *
   15  * You should have received a copy of the GNU General Public License          *
   16  * along with this program; if not, write to the Free Software Foundation     *
   17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
   18  ******************************************************************************/
   19 
   20 #include "icinga/checkable.hpp"
   21 #include "icinga/customvarobject.hpp"
   22 #impl_include "icinga/hostgroup.hpp"
   23 
   24 library icinga;
   25 
   26 namespace icinga
   27 {
   28 
   29 class Host : Checkable
   30 {
   31 	load_after ApiListener;
   32 	load_after Endpoint;
   33 	load_after Zone;
   34 
   35 	[config, no_user_modify, required] array(name(HostGroup)) groups {
   36 		default {{{ return new Array(); }}}
   37 	};
   38 
   39 	[config] String display_name {
   40 		get {{{
   41 			if (m_DisplayName.IsEmpty())
   42 				return GetName();
   43 			else
   44 				return m_DisplayName;
   45 		}}}
   46 	};
   47 
   48 	[config] String address;
   49 	[config] String address6;
   50 
   51 	[enum, no_storage] HostState "state" {
   52 		get;
   53 	};
   54 	[enum, no_storage] HostState last_state {
   55 		get;
   56 	};
   57 	[enum, no_storage] HostState last_hard_state {
   58 		get;
   59 	};
   60 	[state] Timestamp last_state_up;
   61 	[state] Timestamp last_state_down;
   62 };
   63 
   64 }