diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index 898e3aee1..20557694e 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -318,6 +318,9 @@ bool RedisWriter::PrepareObject(const ConfigObject::Ptr& object, Dictionary::Ptr checksums->Set("host_id", GetObjectIdentifier(service->GetHost())); attributes->Set("display_name", service->GetDisplayName()); + // Overwrite name here, `object->name` is 'HostName!ServiceName' but we only want the name of the Service + attributes->Set("name", service->GetShortName()); + groups = service->GetGroups(); getGroup = &::GetObjectByName; } else {