Add 'host_checksum' for services

This commit is contained in:
Michael Friedrich 2018-07-10 15:14:28 +02:00
parent 48f1ce215b
commit 4fb73a44bd
1 changed files with 4 additions and 0 deletions

View File

@ -189,6 +189,7 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool useTran
Checkable::Ptr checkable = dynamic_pointer_cast<Checkable>(object);
if (checkable) {
/* groups_checksum, group_checksums */
propertiesBlacklist.emplace("groups");
Host::Ptr host;
@ -202,6 +203,9 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool useTran
if (service) {
groups = service->GetGroups();
getGroup = &::GetServiceGroup;
/* Calculate the host_checksum */
checkSums->Set("host_checksum", GetIdentifier(service->GetHost()));
} else {
groups = host->GetGroups();
getGroup = &::GetHostGroup;