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

Method OnAllConfigLoaded

lib/icinga/notification.cpp:113–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void Notification::OnAllConfigLoaded()
114{
115 ObjectImpl<Notification>::OnAllConfigLoaded();
116
117 Host::Ptr host = Host::GetByName(GetHostName());
118
119 if (GetServiceName().IsEmpty())
120 m_Checkable = host;
121 else
122 m_Checkable = host->GetServiceByShortName(GetServiceName());
123
124 if (!m_Checkable)
125 BOOST_THROW_EXCEPTION(ScriptError("Notification object refers to a host/service which doesn't exist.", GetDebugInfo()));
126
127 GetCheckable()->RegisterNotification(this);
128}
129
130void Notification::Start(bool runtimeCreated)
131{

Callers

nothing calls this directly

Calls 4

ScriptErrorClass · 0.85
GetServiceByShortNameMethod · 0.80
RegisterNotificationMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected