Merge pull request #8641 from Icinga/bugfix/icingadb-types

Icinga DB: don't write all types
This commit is contained in:
Noah Hilverling 2021-03-03 14:47:33 +01:00 committed by GitHub
commit 0b55073964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 1 deletions

View File

@ -127,7 +127,23 @@ void IcingaDB::UpdateAllConfigObjects()
typedef std::pair<ConfigType *, String> TypePair;
std::vector<TypePair> types;
for (const Type::Ptr& type : Type::GetAllTypes()) {
for (const Type::Ptr& type : {
CheckCommand::TypeInstance,
Comment::TypeInstance,
Downtime::TypeInstance,
Endpoint::TypeInstance,
EventCommand::TypeInstance,
Host::TypeInstance,
HostGroup::TypeInstance,
Notification::TypeInstance,
NotificationCommand::TypeInstance,
Service::TypeInstance,
ServiceGroup::TypeInstance,
TimePeriod::TypeInstance,
User::TypeInstance,
UserGroup::TypeInstance,
Zone::TypeInstance
}) {
ConfigType *ctype = dynamic_cast<ConfigType *>(type.get());
if (!ctype)
continue;