From 998e040b9ab6f22d41fd053930794e25ee1f98b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Aleksandrovi=C4=8D=20Klimov?= Date: Mon, 11 Oct 2021 16:14:30 +0200 Subject: [PATCH] Icinga DB: don't include checkable types in history IDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... as they’re unnecessary for being distinguish across types. Services always have a ! in the name, hosts never do. --- lib/icingadb/icingadb-objects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 69c1f2b57..a5bb2b83a 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -2028,7 +2028,7 @@ void IcingaDB::SendFlappingChange(const Checkable::Ptr& checkable, double change xAdd.emplace_back("start_time"); xAdd.emplace_back(Convert::ToString(startTime)); xAdd.emplace_back("id"); - xAdd.emplace_back(HashValue(new Array({GetEnvironment(), checkable->GetReflectionType()->GetName(), checkable->GetName(), startTime}))); + xAdd.emplace_back(HashValue(new Array({GetEnvironment(), checkable->GetName(), startTime}))); m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History); } @@ -2108,7 +2108,7 @@ void IcingaDB::SendAcknowledgementSet(const Checkable::Ptr& checkable, const Str xAdd.emplace_back("set_time"); xAdd.emplace_back(Convert::ToString(setTime)); xAdd.emplace_back("id"); - xAdd.emplace_back(HashValue(new Array({GetEnvironment(), checkable->GetReflectionType()->GetName(), checkable->GetName(), setTime}))); + xAdd.emplace_back(HashValue(new Array({GetEnvironment(), checkable->GetName(), setTime}))); m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History); } @@ -2153,7 +2153,7 @@ void IcingaDB::SendAcknowledgementCleared(const Checkable::Ptr& checkable, const xAdd.emplace_back("set_time"); xAdd.emplace_back(Convert::ToString(setTime)); xAdd.emplace_back("id"); - xAdd.emplace_back(HashValue(new Array({GetEnvironment(), checkable->GetReflectionType()->GetName(), checkable->GetName(), setTime}))); + xAdd.emplace_back(HashValue(new Array({GetEnvironment(), checkable->GetName(), setTime}))); if (!removedBy.IsEmpty()) { xAdd.emplace_back("cleared_by");