Skip to content

icingadb: use object identifiers for state history event IDs#10838

Open
00Manas-Singh00 wants to merge 4 commits intoIcinga:masterfrom
00Manas-Singh00:service-history-checks
Open

icingadb: use object identifiers for state history event IDs#10838
00Manas-Singh00 wants to merge 4 commits intoIcinga:masterfrom
00Manas-Singh00:service-history-checks

Conversation

@00Manas-Singh00
Copy link
Copy Markdown
Contributor

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}.

@cla-bot cla-bot Bot added the cla/signed label May 5, 2026
@julianbrost
Copy link
Copy Markdown
Member

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.

The object name is what identifies the object in Icinga 2. If it has the same name, it's the same thing. Service::GetName() will return something like mail.example.com!ping, so there shouldn't be a conflict between identically named services belonging to different hosts either.

Then there are also these general issues with this PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants