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 = \
authenticationcomponent.cpp \
authenticationcomponent.h \
discoverycomponent.cpp \
discoverycomponent.h \
endpoint.cpp \
endpoint.h \
endpointmanager.cpp \

View File

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