15
15
16
16
using namespace icinga ;
17
17
18
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
18
+ /* Used in DB IDO and Livestatus. */
19
19
String CompatUtility::GetCommandLine (const Command::Ptr& command)
20
20
{
21
21
Value commandLine = command->GetCommandLine ();
@@ -56,15 +56,15 @@ String CompatUtility::GetCommandNamePrefix(const Command::Ptr& command)
56
56
}
57
57
58
58
String CompatUtility::GetCommandName (const Command::Ptr& command)
59
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
59
+ /* Used in DB IDO and Livestatus. */
60
60
{
61
61
if (!command)
62
62
return Empty;
63
63
64
64
return GetCommandNamePrefix (command) + command->GetName ();
65
65
}
66
66
67
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
67
+ /* Used in DB IDO and Livestatus. */
68
68
String CompatUtility::GetCheckableCommandArgs (const Checkable::Ptr& checkable)
69
69
{
70
70
CheckCommand::Ptr command = checkable->GetCheckCommand ();
@@ -130,7 +130,7 @@ String CompatUtility::GetCheckableCommandArgs(const Checkable::Ptr& checkable)
130
130
return Empty;
131
131
}
132
132
133
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
133
+ /* Used in DB IDO and Livestatus. */
134
134
int CompatUtility::GetCheckableNotificationLastNotification (const Checkable::Ptr& checkable)
135
135
{
136
136
double last_notification = 0.0 ;
@@ -142,7 +142,7 @@ int CompatUtility::GetCheckableNotificationLastNotification(const Checkable::Ptr
142
142
return static_cast <int >(last_notification);
143
143
}
144
144
145
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
145
+ /* Used in DB IDO and Livestatus. */
146
146
int CompatUtility::GetCheckableNotificationNextNotification (const Checkable::Ptr& checkable)
147
147
{
148
148
double next_notification = 0.0 ;
@@ -154,7 +154,7 @@ int CompatUtility::GetCheckableNotificationNextNotification(const Checkable::Ptr
154
154
return static_cast <int >(next_notification);
155
155
}
156
156
157
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
157
+ /* Used in DB IDO and Livestatus. */
158
158
int CompatUtility::GetCheckableNotificationNotificationNumber (const Checkable::Ptr& checkable)
159
159
{
160
160
int notification_number = 0 ;
@@ -166,7 +166,7 @@ int CompatUtility::GetCheckableNotificationNotificationNumber(const Checkable::P
166
166
return notification_number;
167
167
}
168
168
169
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
169
+ /* Used in DB IDO and Livestatus. */
170
170
double CompatUtility::GetCheckableNotificationNotificationInterval (const Checkable::Ptr& checkable)
171
171
{
172
172
double notification_interval = -1 ;
@@ -210,7 +210,7 @@ int CompatUtility::GetCheckableNotificationStateFilter(const Checkable::Ptr& che
210
210
return notification_state_filter;
211
211
}
212
212
213
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
213
+ /* Used in DB IDO and Livestatus. */
214
214
std::set<User::Ptr> CompatUtility::GetCheckableNotificationUsers (const Checkable::Ptr& checkable)
215
215
{
216
216
/* Service -> Notifications -> (Users + UserGroups -> Users) */
@@ -233,7 +233,7 @@ std::set<User::Ptr> CompatUtility::GetCheckableNotificationUsers(const Checkable
233
233
return allUsers;
234
234
}
235
235
236
- /* Used in DB IDO, StatusDataWriter and Livestatus. */
236
+ /* Used in DB IDO and Livestatus. */
237
237
std::set<UserGroup::Ptr> CompatUtility::GetCheckableNotificationUserGroups (const Checkable::Ptr& checkable)
238
238
{
239
239
std::set<UserGroup::Ptr> usergroups;
@@ -249,7 +249,7 @@ std::set<UserGroup::Ptr> CompatUtility::GetCheckableNotificationUserGroups(const
249
249
return usergroups;
250
250
}
251
251
252
- /* Used in DB IDO, StatusDataWriter, Livestatus, CompatLogger , GelfWriter, IcingaDB. */
252
+ /* Used in DB IDO, Livestatus, GelfWriter, IcingaDB. */
253
253
String CompatUtility::GetCheckResultOutput (const CheckResult::Ptr& cr)
254
254
{
255
255
if (!cr)
@@ -264,7 +264,7 @@ String CompatUtility::GetCheckResultOutput(const CheckResult::Ptr& cr)
264
264
return raw_output.SubStr (0 , line_end);
265
265
}
266
266
267
- /* Used in DB IDO, StatusDataWriter and Livestatus, IcingaDB. */
267
+ /* Used in DB IDO and Livestatus, IcingaDB. */
268
268
String CompatUtility::GetCheckResultLongOutput (const CheckResult::Ptr& cr)
269
269
{
270
270
if (!cr)
@@ -285,15 +285,15 @@ String CompatUtility::GetCheckResultLongOutput(const CheckResult::Ptr& cr)
285
285
return Empty;
286
286
}
287
287
288
- /* Helper for DB IDO, StatusDataWriter and Livestatus. Used in StatusDataWriter . */
288
+ /* Helper for DB IDO and Livestatus. */
289
289
String CompatUtility::EscapeString (const String& str)
290
290
{
291
291
String result = str;
292
292
boost::algorithm::replace_all (result, " \n " , " \\ n" );
293
293
return result;
294
294
}
295
295
296
- /* Used in ExternalCommandListener and CheckResultReader . */
296
+ /* Used in ExternalCommandProcessor . */
297
297
String CompatUtility::UnEscapeString (const String& str)
298
298
{
299
299
String result = str;
0 commit comments