In prometheus/common the fingerprint of an alert is calculated as an fnv64a 
hash of it's labels. The labels are first sorted, and then the label name, 
separator, label value, and another separator for each label is added to 
the hash before the final sum is calculated.

I noticed that something missing from the fingerprint is the alert's 
StartsAt time. You could argue that an alert with labels a₁a₂aₙ that 
started at time t₁ and then resolved at time t₂ is a different alert than 
one also with the labels a₁a₂aₙ but started at time t₃ - and so these two 
alerts should have different fingerprints.

The fact that the fingerprint is constant over its labels has proven 
interesting while debugging cases of flapping alerts in Alertmanager.

However, while I would like to add StartsAt to the fingerprint, I am 
concerned that adding the StartsAt timestamp to the fingerprint will break 
Prometheus rules when run in HA as I do not believe the StartsAt time is 
synchronised across rulers.

I was wondering if there is some historical context for this? Perhaps the 
reasons mentioned above, but there could be others that I am also unaware 
of?

Best regards

George


-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/b722e00e-bfd8-4ff4-bbef-e5e0836280bbn%40googlegroups.com.

Reply via email to