Open algo7 opened 1 month ago
Mimir Ruler should be able to support multi-tenant request just like it does for the metrics.
How exactly should Mimir Ruler endpoint for listing rules work when it finds multiple tenants in X-Scope-OrgID
header? List rule groups from all tenants? Then we run into possibility of conflicting namespaces. Shall endpoint create logical hiearchy with tenant in the top-level? Then view would be different between single-tenant and multi-tenant and all clients would need to understand both.
What about endpoint for setting rule group, or deleting namespace? Should the modification be applied to the first tenant? All tenants?
These questions need to be answered before we can add support for multi tenancy into Ruler API.
Mimir Ruler should be able to support multi-tenant request just like it does for the metrics.
How exactly should Mimir Ruler endpoint for listing rules work when it finds multiple tenants in
X-Scope-OrgID
header? List rule groups from all tenants? Then we run into possibility of conflicting namespaces. Shall endpoint create logical hiearchy with tenant in the top-level? Then view would be different between single-tenant and multi-tenant and all clients would need to understand both.What about endpoint for setting rule group, or deleting namespace? Should the modification be applied to the first tenant? All tenants?
These questions need to be answered before we can add support for multi tenancy into Ruler API.
I see. Then maybe it will make sense to include the challenges you described above in the documentation so it's clear to everyone.
It's mentioned in the official documentation
Grafana Mimir is a multi-tenant system where tenants can query metrics and alerts that include their tenant ID. The query takes the tenant ID from the X-Scope-OrgID parameter that exists in the HTTP header of each request, for example X-Scope-OrgID:
. You can federate queries across multiple tenants by using true in -tenant-federation.enabled=true. When you specify tenant IDs, separate them with a pipe (|) character in the X-Scope-OrgID header, as in the example X-Scope-OrgID: tenant-1|tenant-2|tenant-3.
Source: https://grafana.com/docs/mimir/latest/manage/secure/authentication-and-authorization/
It's easy for people to assume that all components in the Grafana Mimir system support multi-tenancy until they realize that's not the case during implémentation.
Once it's made cleared, maybe the community will be able to offer some creative solutions.
I start the issue with "it's frustrating..." because it's part of the template provided. While it's actually frustrating, I do appreciate the work being done at Grafana Lab and there's no offense.
Hopefully there will be solutions or easier alternatives to this problem soon.
Assigning to myself so that we can assign these to the new Mimir tech writer when she is sufficiently through onboarding.
Is your feature request related to a problem? Please describe.
It is frustrating that you can't use Mimir ruler with multiple tenants. We are using Grafna Mimir with Grafana Alert and on the Grafana Alert UI it shows
In the Mimir Ruler logs:
and is unable to utilize Mimir Ruler
Describe the solution you'd like
When adding Mimir as a datasource in Grafana, one can add
X-Scope-OrgID
in the header with tenants being a|
separated list for getting metrics across multiple tenants. Mimir Ruler should be able to support multi-tenant request just like it does for the metrics.Describe alternatives you've considered
Additional context
There was an old issue here, which was closed without specific reason: https://github.com/grafana/mimir/issues/6020
There is a post on Grafana Community with no replies: https://community.grafana.com/t/alerting-plugin-with-multi-tenant-mimir-ruler/112040