1 /******************************************************************************
3 * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
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. *
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. *
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 ******************************************************************************/
20 #ifndef SERVICESTABLE_H
21 #define SERVICESTABLE_H
23 #include "livestatus/table.hpp"
25 using namespace icinga;
33 class I2_LIVESTATUS_API ServicesTable : public Table
36 DECLARE_PTR_TYPEDEFS(ServicesTable);
38 ServicesTable(LivestatusGroupByType type = LivestatusGroupByNone);
40 static void AddColumns(Table *table, const String& prefix = String(),
41 const Column::ObjectAccessor& objectAccessor = Column::ObjectAccessor());
43 virtual String GetName(void) const override;
44 virtual String GetPrefix(void) const override;
47 virtual void FetchRows(const AddRowFunction& addRowFn) override;
49 static Object::Ptr HostAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
50 static Object::Ptr ServiceGroupAccessor(const Value& row, LivestatusGroupByType groupByType, const Object::Ptr& groupByObject);
51 static Object::Ptr HostGroupAccessor(const Value& row, LivestatusGroupByType groupByType, const Object::Ptr& groupByObject);
53 static Value ShortNameAccessor(const Value& row);
54 static Value DisplayNameAccessor(const Value& row);
55 static Value CheckCommandAccessor(const Value& row);
56 static Value CheckCommandExpandedAccessor(const Value& row);
57 static Value EventHandlerAccessor(const Value& row);
58 static Value PluginOutputAccessor(const Value& row);
59 static Value LongPluginOutputAccessor(const Value& row);
60 static Value PerfDataAccessor(const Value& row);
61 static Value CheckPeriodAccessor(const Value& row);
62 static Value NotesAccessor(const Value& row);
63 static Value NotesExpandedAccessor(const Value& row);
64 static Value NotesUrlAccessor(const Value& row);
65 static Value NotesUrlExpandedAccessor(const Value& row);
66 static Value ActionUrlAccessor(const Value& row);
67 static Value ActionUrlExpandedAccessor(const Value& row);
68 static Value IconImageAccessor(const Value& row);
69 static Value IconImageExpandedAccessor(const Value& row);
70 static Value IconImageAltAccessor(const Value& row);
71 static Value MaxCheckAttemptsAccessor(const Value& row);
72 static Value CurrentAttemptAccessor(const Value& row);
73 static Value StateAccessor(const Value& row);
74 static Value HasBeenCheckedAccessor(const Value& row);
75 static Value LastStateAccessor(const Value& row);
76 static Value LastHardStateAccessor(const Value& row);
77 static Value StateTypeAccessor(const Value& row);
78 static Value CheckTypeAccessor(const Value& row);
79 static Value AcknowledgedAccessor(const Value& row);
80 static Value AcknowledgementTypeAccessor(const Value& row);
81 static Value NoMoreNotificationsAccessor(const Value& row);
82 static Value LastTimeOkAccessor(const Value& row);
83 static Value LastTimeWarningAccessor(const Value& row);
84 static Value LastTimeCriticalAccessor(const Value& row);
85 static Value LastTimeUnknownAccessor(const Value& row);
86 static Value LastCheckAccessor(const Value& row);
87 static Value NextCheckAccessor(const Value& row);
88 static Value LastNotificationAccessor(const Value& row);
89 static Value NextNotificationAccessor(const Value& row);
90 static Value CurrentNotificationNumberAccessor(const Value& row);
91 static Value LastStateChangeAccessor(const Value& row);
92 static Value LastHardStateChangeAccessor(const Value& row);
93 static Value ScheduledDowntimeDepthAccessor(const Value& row);
94 static Value IsFlappingAccessor(const Value& row);
95 static Value ChecksEnabledAccessor(const Value& row);
96 static Value AcceptPassiveChecksAccessor(const Value& row);
97 static Value EventHandlerEnabledAccessor(const Value& row);
98 static Value NotificationsEnabledAccessor(const Value& row);
99 static Value ProcessPerformanceDataAccessor(const Value& row);
100 static Value ActiveChecksEnabledAccessor(const Value& row);
101 static Value CheckOptionsAccessor(const Value& row);
102 static Value FlapDetectionEnabledAccessor(const Value& row);
103 static Value CheckFreshnessAccessor(const Value& row);
104 static Value StalenessAccessor(const Value& row);
105 static Value CheckIntervalAccessor(const Value& row);
106 static Value RetryIntervalAccessor(const Value& row);
107 static Value NotificationIntervalAccessor(const Value& row);
108 static Value LowFlapThresholdAccessor(const Value& row);
109 static Value HighFlapThresholdAccessor(const Value& row);
110 static Value LatencyAccessor(const Value& row);
111 static Value ExecutionTimeAccessor(const Value& row);
112 static Value PercentStateChangeAccessor(const Value& row);
113 static Value InCheckPeriodAccessor(const Value& row);
114 static Value InNotificationPeriodAccessor(const Value& row);
115 static Value ContactsAccessor(const Value& row);
116 static Value DowntimesAccessor(const Value& row);
117 static Value DowntimesWithInfoAccessor(const Value& row);
118 static Value CommentsAccessor(const Value& row);
119 static Value CommentsWithInfoAccessor(const Value& row);
120 static Value CommentsWithExtraInfoAccessor(const Value& row);
121 static Value CustomVariableNamesAccessor(const Value& row);
122 static Value CustomVariableValuesAccessor(const Value& row);
123 static Value CustomVariablesAccessor(const Value& row);
124 static Value GroupsAccessor(const Value& row);
125 static Value ContactGroupsAccessor(const Value& row);
126 static Value CheckSourceAccessor(const Value& row);
127 static Value IsReachableAccessor(const Value& row);
128 static Value CVIsJsonAccessor(const Value& row);
129 static Value OriginalAttributesAccessor(const Value& row);
134 #endif /* SERVICESTABLE_H */