You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Grouped alert resolve renders empty group values when the group vanishes from the data #3470
Get a grouped alert's resolve notification to name the group that fired, even when that group has no rows left.
I run a per-host alert: one alert grouped by host, firing when a host's error count climbs. When a host stops reporting altogether, its group has no rows in the resolve window, and the resolve renders {{attributes.host}} and {{var.host}} empty. The firing title and message named the host; the resolve says a host resolved, with the name blank. {{groupKey}} is still set on the resolve, but only as the joined string, so getting the host out as its own field means parsing it.
Store the group's values on its alert history row when the group is evaluated, and use them when the group resolves with no rows left.
When a group evaluates with values, write them to its history row alongside group.
At resolve, if the group has no current rows, fall back to the values on the previous history row.
History rows written before the change hold no values, so a group whose latest row predates the change and then vanishes resolves blank once more. A group that is evaluated at least once after the change carries its values.
No schema migration: one optional field on the history document.
Reading the group out of {{groupKey}} on the receiving side. It works for matching a resolve to a fire, but it leaves the alert title and message blank and puts the parsing in every receiver.
Anything else?
A PR is ready with the change and an integration test: a raw SQL tile alert grouped by service fires for one service, that service's rows disappear, and the resolve notification names the service. The {{var}} docs row drops its "no rows left" caveat. I'll open it once this is scoped.
Activity
fix(api): resolve a vanished alert group with its values (ClickHouse#…