Skip to content

receive: add relabel config by tenant #8761

@Gladorme

Description

@Gladorme

Is your proposal related to a problem?

Currently, it's not possible to do specific relabel config for a specific tenant. Relabel config is global to all tenants.

Describe the solution you'd like

Either allow user to define relabel config by tenant or inject tenant id label before relabel config is applied.

Describe alternatives you've considered

I tried the following relabel config, but it does not work:

- action: drop
  source_labels: [tenant_id, __name__]
  separator: "@"
  regex: mysuper-tenant@(mysupermetric)

Because label tenant id is added after the relabel config:

h.relabel(&wreq)

Additional context

To me, a relabel config by tenant is easier to maintain, than a huge regex in global relabel config 😅
But it bring some reflections: if there is a tenant relabel config for a tenant, is it applied after / before global relabel config OR it is overriding the global relabel config.

Happy to see your point of view about this use-case or if I missed something already allowing to do this 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions