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

Method GetCheckableNotificationNotificationInterval

lib/icinga/compatutility.cpp:171–184  ·  view source on GitHub ↗

Used in DB IDO and Livestatus. */

Source from the content-addressed store, hash-verified

169
170/* Used in DB IDO and Livestatus. */
171double CompatUtility::GetCheckableNotificationNotificationInterval(const Checkable::Ptr& checkable)
172{
173 double notification_interval = -1;
174
175 for (const Notification::Ptr& notification : checkable->GetNotifications()) {
176 if (notification_interval == -1 || notification->GetInterval() < notification_interval)
177 notification_interval = notification->GetInterval();
178 }
179
180 if (notification_interval == -1)
181 notification_interval = 60;
182
183 return notification_interval / 60.0;
184}
185
186/* Helper. */
187int CompatUtility::GetCheckableNotificationTypeFilter(const Checkable::Ptr& checkable)

Callers

nothing calls this directly

Calls 2

GetIntervalMethod · 0.80
GetNotificationsMethod · 0.45

Tested by

no test coverage detected