1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef SERVICESTABLE_H
4 #define SERVICESTABLE_H
6 #include "livestatus/table.hpp"
8 using namespace icinga;
16 class ServicesTable final : public Table
19 DECLARE_PTR_TYPEDEFS(ServicesTable);
21 ServicesTable(LivestatusGroupByType type = LivestatusGroupByNone);
23 static void AddColumns(Table *table, const String& prefix = String(),
24 const Column::ObjectAccessor& objectAccessor = Column::ObjectAccessor());
26 String GetName() const override;
27 String GetPrefix() const override;
30 void FetchRows(const AddRowFunction& addRowFn) override;
32 static Object::Ptr HostAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
33 static Object::Ptr ServiceGroupAccessor(const Value& row, LivestatusGroupByType groupByType, const Object::Ptr& groupByObject);
34 static Object::Ptr HostGroupAccessor(const Value& row, LivestatusGroupByType groupByType, const Object::Ptr& groupByObject);
36 static Value ShortNameAccessor(const Value& row);
37 static Value DisplayNameAccessor(const Value& row);
38 static Value CheckCommandAccessor(const Value& row);
39 static Value CheckCommandExpandedAccessor(const Value& row);
40 static Value EventHandlerAccessor(const Value& row);
41 static Value PluginOutputAccessor(const Value& row);
42 static Value LongPluginOutputAccessor(const Value& row);
43 static Value PerfDataAccessor(const Value& row);
44 static Value CheckPeriodAccessor(const Value& row);
45 static Value NotesAccessor(const Value& row);
46 static Value NotesExpandedAccessor(const Value& row);
47 static Value NotesUrlAccessor(const Value& row);
48 static Value NotesUrlExpandedAccessor(const Value& row);
49 static Value ActionUrlAccessor(const Value& row);
50 static Value ActionUrlExpandedAccessor(const Value& row);
51 static Value IconImageAccessor(const Value& row);
52 static Value IconImageExpandedAccessor(const Value& row);
53 static Value IconImageAltAccessor(const Value& row);
54 static Value MaxCheckAttemptsAccessor(const Value& row);
55 static Value CurrentAttemptAccessor(const Value& row);
56 static Value StateAccessor(const Value& row);
57 static Value HasBeenCheckedAccessor(const Value& row);
58 static Value LastStateAccessor(const Value& row);
59 static Value LastHardStateAccessor(const Value& row);
60 static Value StateTypeAccessor(const Value& row);
61 static Value CheckTypeAccessor(const Value& row);
62 static Value AcknowledgedAccessor(const Value& row);
63 static Value AcknowledgementTypeAccessor(const Value& row);
64 static Value NoMoreNotificationsAccessor(const Value& row);
65 static Value LastTimeOkAccessor(const Value& row);
66 static Value LastTimeWarningAccessor(const Value& row);
67 static Value LastTimeCriticalAccessor(const Value& row);
68 static Value LastTimeUnknownAccessor(const Value& row);
69 static Value LastCheckAccessor(const Value& row);
70 static Value NextCheckAccessor(const Value& row);
71 static Value LastNotificationAccessor(const Value& row);
72 static Value NextNotificationAccessor(const Value& row);
73 static Value CurrentNotificationNumberAccessor(const Value& row);
74 static Value LastStateChangeAccessor(const Value& row);
75 static Value LastHardStateChangeAccessor(const Value& row);
76 static Value ScheduledDowntimeDepthAccessor(const Value& row);
77 static Value IsFlappingAccessor(const Value& row);
78 static Value ChecksEnabledAccessor(const Value& row);
79 static Value AcceptPassiveChecksAccessor(const Value& row);
80 static Value EventHandlerEnabledAccessor(const Value& row);
81 static Value NotificationsEnabledAccessor(const Value& row);
82 static Value ProcessPerformanceDataAccessor(const Value& row);
83 static Value ActiveChecksEnabledAccessor(const Value& row);
84 static Value FlapDetectionEnabledAccessor(const Value& row);
85 static Value StalenessAccessor(const Value& row);
86 static Value CheckIntervalAccessor(const Value& row);
87 static Value RetryIntervalAccessor(const Value& row);
88 static Value NotificationIntervalAccessor(const Value& row);
89 static Value LowFlapThresholdAccessor(const Value& row);
90 static Value HighFlapThresholdAccessor(const Value& row);
91 static Value LatencyAccessor(const Value& row);
92 static Value ExecutionTimeAccessor(const Value& row);
93 static Value PercentStateChangeAccessor(const Value& row);
94 static Value InCheckPeriodAccessor(const Value& row);
95 static Value InNotificationPeriodAccessor(const Value& row);
96 static Value ContactsAccessor(const Value& row);
97 static Value DowntimesAccessor(const Value& row);
98 static Value DowntimesWithInfoAccessor(const Value& row);
99 static Value CommentsAccessor(const Value& row);
100 static Value CommentsWithInfoAccessor(const Value& row);
101 static Value CommentsWithExtraInfoAccessor(const Value& row);
102 static Value CustomVariableNamesAccessor(const Value& row);
103 static Value CustomVariableValuesAccessor(const Value& row);
104 static Value CustomVariablesAccessor(const Value& row);
105 static Value GroupsAccessor(const Value& row);
106 static Value ContactGroupsAccessor(const Value& row);
107 static Value CheckSourceAccessor(const Value& row);
108 static Value IsReachableAccessor(const Value& row);
109 static Value CVIsJsonAccessor(const Value& row);
110 static Value OriginalAttributesAccessor(const Value& row);
115 #endif /* SERVICESTABLE_H */