alerta icon indicating copy to clipboard operation
alerta copied to clipboard

Issues of promethues tags merging

Open benbenai7786 opened this issue 4 years ago • 2 comments

Hi guys, I got an issues about the promethues tags problem, here is the story: For example, I got some prometheus clusters connecting to the same alertmanager, when generating first alert, such as "environment=Production, resource=n/a, event=XXX tags=['a=1']", it looks normal, but after the second coming like "environment=Production, resource=n/a, event=XXX tags=['b=2']", alerta will merge the tags looks like "environment=Production, resource=n/a, event=XXX tags=['a=1','b=2']", And also I write a plugin to report the alert via IM Tools, "alert.tags" become longer and longer, so any suggestion for spilit the tags?

benbenai7786 avatar May 19 '21 10:05 benbenai7786

I have same situation. As a variant we can group tags, but at the end of page print alerts summary. After some of grouped alerts closed, delete line from table summary. In history we need lines with opentime/closetime and summary. PS sammary is a cutsom attribute from alert.

variant1

anvpetrov avatar May 19 '21 13:05 anvpetrov

An alert uniqueness is defined by a combination of environment-resource-event so the two alerts from your example above are identical, from Alerta's point of view, which is why the tags were merged.

If you want a different tag to create a different alert then the tag needs to become part of either the alert resource or event.

satterly avatar May 23 '21 11:05 satterly