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

Method OnAllConfigLoaded

lib/icinga/comment.cpp:63–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void Comment::OnAllConfigLoaded()
64{
65 ConfigObject::OnAllConfigLoaded();
66
67 Host::Ptr host = Host::GetByName(GetHostName());
68
69 if (GetServiceName().IsEmpty() || ! host)
70 m_Checkable = host;
71 else
72 m_Checkable = host->GetServiceByShortName(GetServiceName());
73
74 if (!m_Checkable)
75 BOOST_THROW_EXCEPTION(ScriptError("Comment '" + GetName() + "' references a host/service which doesn't exist.", GetDebugInfo()));
76}
77
78void Comment::Start(bool runtimeCreated)
79{

Callers

nothing calls this directly

Calls 3

ScriptErrorClass · 0.85
GetServiceByShortNameMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected