Skip to content

Alertmanager exporter should allow additional labels #38063

@JettJones

Description

@JettJones

Component(s)

No response

Is your feature request related to a problem? Please describe.

Alertmanager routing can select different routes based on labels on incoming alerts. But the altermanager exporter creates only two labels: severity and event_name.

My desired use case is to route alerts based on the service name, and severity, with overrides for some library events. I expect the mapping of teams handling alerts is fairly unique by company, so more flexibility is helpful here.

Describe the solution you'd like

Accept in configuration a list of event annotations to promote to labels.

When an annotation is present, add its value to the LabelSet of the created alert, here:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/alertmanagerexporter/alertmanager_exporter.go#L116

Describe alternatives you've considered

To get similar behavior of passing routing information into alertmanager:

  • concatenate multiple labels into event_name and use regex matchers in alertmanager to separate them again.
  • fork this exporter, and add label support.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions