Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"catchall" tenant id for quering #14484

Open
rlex opened this issue Oct 13, 2024 · 0 comments
Open

"catchall" tenant id for quering #14484

rlex opened this issue Oct 13, 2024 · 0 comments

Comments

@rlex
Copy link
Contributor

rlex commented Oct 13, 2024

Is your feature request related to a problem? Please describe.
I want to utilize loki's multi-tenant functionality to automatically route logs to separate tenants and query them. It's more for accounting and separate limits than to actual ACL and permissions, so proper isolation isn't problem here. To use multi-tenant query function i need to pass all supported tenant IDs to X-Scope-OrgID header when quering. However, it quickly becomes a problem. For example, we have more than 100 namespaces that needs to be routed, or if we want to route based on team names, it's even more. As more teams/nses gets created, it needs constant manual adding to grafana's config, which requires manual intervention each time. Of course it's possible, but it's sub-optimal.

Describe the solution you'd like
Implement some kind of reserved "catchall" tenant ID (which should be explicitly enabled via loki config) that allows you to query all available tenants, if it's possible.

Describe alternatives you've considered
Can't think of anything else. Another option might be specifying tenant ID via query, but reserved __tenant_id__ only allows filtering on tenants already defined in request header.
Maybe something like
__query_tenant_id__ that works the same way as header?

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant