icingadb: use object identifiers for state history event IDs#10838
Open
00Manas-Singh00 wants to merge 4 commits intoIcinga:masterfrom
Open
icingadb: use object identifiers for state history event IDs#1083800Manas-Singh00 wants to merge 4 commits intoIcinga:masterfrom
00Manas-Singh00 wants to merge 4 commits intoIcinga:masterfrom
Conversation
….04 and Amazon Linux 2
Member
The object name is what identifies the object in Icinga 2. If it has the same name, it's the same thing. Then there are also these general issues with this PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
State history IDs in the Icinga DB publisher were derived from object names, which can collide in HA setups where similarly named checks exist on different masters. This could cause service history entries to appear mixed between hosts/endpoints.
This change makes state history identity use the stable Icinga DB object identifier instead of raw object name:
CalcEventID(...) now hashes GetObjectIdentifier(object) (not object->GetName()).
SendStateChange(...) now builds history id from {environment_id, object_identifier, event_ts}.