MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetCheckableNotificationUserGroups

Method GetCheckableNotificationUserGroups

lib/icinga/compatutility.cpp:238–251  ·  view source on GitHub ↗

Used in DB IDO and Livestatus. */

Source from the content-addressed store, hash-verified

236
237/* Used in DB IDO and Livestatus. */
238std::set<UserGroup::Ptr> CompatUtility::GetCheckableNotificationUserGroups(const Checkable::Ptr& checkable)
239{
240 std::set<UserGroup::Ptr> usergroups;
241 /* Service -> Notifications -> UserGroups */
242 for (const Notification::Ptr& notification : checkable->GetNotifications()) {
243 ObjectLock olock(notification);
244
245 for (const UserGroup::Ptr& ug : notification->GetUserGroups()) {
246 usergroups.insert(ug);
247 }
248 }
249
250 return usergroups;
251}
252
253/* Used in DB IDO, Livestatus, CompatLogger, GelfWriter, IcingaDB. */
254String CompatUtility::GetCheckResultOutput(const CheckResult::Ptr& cr)

Callers

nothing calls this directly

Calls 3

GetUserGroupsMethod · 0.80
GetNotificationsMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected