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

Method GetCheckableNotificationLastNotification

lib/icinga/compatutility.cpp:135–144  ·  view source on GitHub ↗

Used in DB IDO and Livestatus. */

Source from the content-addressed store, hash-verified

133
134/* Used in DB IDO and Livestatus. */
135int CompatUtility::GetCheckableNotificationLastNotification(const Checkable::Ptr& checkable)
136{
137 double last_notification = 0.0;
138 for (const Notification::Ptr& notification : checkable->GetNotifications()) {
139 if (notification->GetLastNotification() > last_notification)
140 last_notification = notification->GetLastNotification();
141 }
142
143 return static_cast<int>(last_notification);
144}
145
146/* Used in DB IDO and Livestatus. */
147int CompatUtility::GetCheckableNotificationNextNotification(const Checkable::Ptr& checkable)

Callers

nothing calls this directly

Calls 2

GetLastNotificationMethod · 0.80
GetNotificationsMethod · 0.45

Tested by

no test coverage detected