Skip to content

prometheus output with strings-as-labels does not handle duplicate labels under different paths #792

@vadimberezniker

Description

@vadimberezniker

e.g. if the raw data contains these kvs:

      "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last-notification-error-code": "openconfig-bgp-types:CEASE",
      "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last-notification-error-code": "openconfig-bgp-types:HOLD_TIMER_EXPIRED",

Both will be added to a prometheus metric under the last-notification-error-code label causing this metric to be dropped silently since the prometheus http handler is registered with ContinueOnError.
It would be nice if the prometheus exporter at least logged a warning when duplicate labels are encountered and removed any duplicates so that at least some data was pushed to prometheus instead of dropping the metric entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions