Auto-load the discovery component.

This commit is contained in:
Gunnar Beutner 2012-04-23 16:51:03 +02:00
parent 885f1834f1
commit 9e85d1efe4
2 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,8 @@ pkglib_LTLIBRARIES = \
libicinga_la_SOURCES = \ libicinga_la_SOURCES = \
authenticationcomponent.cpp \ authenticationcomponent.cpp \
authenticationcomponent.h \ authenticationcomponent.h \
discoverycomponent.cpp \
discoverycomponent.h \
endpoint.cpp \ endpoint.cpp \
endpoint.h \ endpoint.h \
endpointmanager.cpp \ endpointmanager.cpp \

View File

@ -60,6 +60,9 @@ int IcingaApplication::Main(const vector<string>& args)
SubscriptionComponent::Ptr subscriptionComponent = make_shared<SubscriptionComponent>(); SubscriptionComponent::Ptr subscriptionComponent = make_shared<SubscriptionComponent>();
RegisterComponent(subscriptionComponent); RegisterComponent(subscriptionComponent);
DiscoveryComponent::Ptr discoveryComponent = make_shared<DiscoveryComponent>();
RegisterComponent(discoveryComponent);
ConfigObject::Ptr fileComponentConfig = make_shared<ConfigObject>("component", "configfile"); ConfigObject::Ptr fileComponentConfig = make_shared<ConfigObject>("component", "configfile");
fileComponentConfig->SetPropertyString("configFilename", args[1]); fileComponentConfig->SetPropertyString("configFilename", args[1]);
fileComponentConfig->SetPropertyInteger("replicate", 0); fileComponentConfig->SetPropertyInteger("replicate", 0);