grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.95k stars 3.45k forks source link

Add federated rules #7659

Open jhychan opened 2 years ago

jhychan commented 2 years ago

Is your feature request related to a problem? Please describe. Loki now supports federated tenant queries via multi_tenant_queries_enabled, however Loki ruler does not yet support federated rules. Mimir has a working implementation for federated rules which I'm hoping can be ported over to Loki as well.

Describe the solution you'd like For Loki ruler to have the same rule configuration syntax to enable support for multi-tenant rules: See: https://github.com/grafana/mimir/pull/533 https://github.com/grafana/mimir-prometheus/pull/55

Alert rule groups include an optional key source_tenants where a list of tenant IDs can be supplied for the alert rule group when executing rule queries against multiple tenants.

Describe alternatives you've considered Having ruler implementation in Loki on feature parity with Mimir is probably the ideal way forward.

Additional context We are already using federated alert rules in Mimir, and would like feature parity for our Loki alert rules.

mbdeveci commented 1 year ago

Hi, any update on this ?

jeschkies commented 1 year ago

I think it'll work with remote rule execution.

mayurans commented 1 year ago

We also require federated rules in Loki for the multi-tenants deployment.

Do you have any update on this? Thanks

oleksii-boiko-ua commented 7 months ago

@jeschkies, but you put rules in per tenant folder right? not sure how to make it work

jeschkies commented 7 months ago

You can try and name the tenant folder according to the concatenated tenant IDs as described here, e.g. A|B for tenants A and B. I'm not sure if that works, though. I haven't worked with the ruler much.

oleksii-boiko-ua commented 6 months ago

i got msg="rule evaluat │ │ ion failed" err="rpc error: code = Unknown desc = multiple org IDs present" when i do this

anteex294 commented 6 months ago

any update on this issue ?

KA-ROM commented 1 month ago

++