mimir icon indicating copy to clipboard operation
mimir copied to clipboard

Add alert_relabeling_configs and external_labels to mimir ruler

Open ToonTijtgat2 opened this issue 1 year ago • 19 comments

What this PR does

Add the ability to have alert_relabeling_configs and external_labels.

Which issue(s) this PR fixes or relates to

Fixes #7295 Fixes https://github.com/grafana/mimir/issues/3490

Checklist

  • [ ] Tests updated.
  • [x] Documentation added.
  • [x] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • [ ] about-versioning.md updated with experimental features.

ToonTijtgat2 avatar Feb 07 '24 12:02 ToonTijtgat2

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 07 '24 12:02 CLAassistant

Dear

Thanks for checking this pullrequest. To be honest I wanted to be able to have an overwrite on the external label or alert_relabel_configs setup per tenant (UserId) I did not find how to do this. Think limits should be included in the ruler setup, The default NewDefaultMultiTenantManager does not take any userid in account.

Toon Tijtgat

ToonTijtgat2 avatar Feb 07 '24 12:02 ToonTijtgat2

The code between loki and mimir is different, but I think this is optional to do in loki according to this line of code. https://github.com/grafana/loki/blob/46c6118eb2a2d56406042431dfbed288df6e924b/pkg/ruler/base/manager.go#L202

Would it be possible to implement this option for mimir?

ToonTijtgat2 avatar Feb 07 '24 13:02 ToonTijtgat2

@grafana/mimir-ruler-and-alertmanager-maintainers can one of you folks take a look at this PR please?

dimitarvdimitrov avatar Feb 08 '24 16:02 dimitarvdimitrov

@dimitarvdimitrov are there any plans to merge this PR? we are looking forward to this functionality.

arnitolog avatar Mar 04 '24 17:03 arnitolog

i'm not terribly familiar with the ruler's flow of updating rules. I think this needs some basic tests at least. Perhaps extending TestSendAlerts in ruler_test.go? I'm not super sure

I've also pinged the alerting team in slack to see if they can give this a look

Thanks for checking. As suggested I moved the changelog to the mimir section.

For the testing, I'm not sure how to handle this. I went to the code of loki to see how they handled it there, https://github.com/grafana/loki/blob/main/pkg/ruler/base/ruler_test.go But I'm not able to find anything related to those labels.

ToonTijtgat2 avatar Mar 06 '24 08:03 ToonTijtgat2

The CHANGELOG has just been cut to prepare for the next Mimir release. Please rebase main and eventually move the CHANGELOG entry added / updated in this PR to the top of the CHANGELOG document. Thanks!

duricanikolic avatar Mar 12 '24 09:03 duricanikolic

I just find this and we would really be interested in this

QuentinBisson avatar Mar 14 '24 14:03 QuentinBisson

@grobinson-grafana can you take a look at this PR please?

dimitarvdimitrov avatar Mar 15 '24 10:03 dimitarvdimitrov

@dimitarvdimitrov is there a way to help push this forward? I really think this would provide a lot of value

QuentinBisson avatar Apr 01 '24 20:04 QuentinBisson

@duricanikolic do you know if it's possible to get this PR forward? This is a really important feature

QuentinBisson avatar May 06 '24 11:05 QuentinBisson