Skip to content

rabbitmq_queue_exchange_messages_published_total in /metrics/per-object has a duplicate vhost label #12347

@Gama11

Description

@Gama11

Describe the bug

Prometheus seems to choke on duplicate labels:

image

Note how vhost appears twice here:

# TYPE rabbitmq_queue_exchange_messages_published_total counter
# HELP rabbitmq_queue_exchange_messages_published_total Total number of messages published into a queue through an exchange
rabbitmq_queue_exchange_messages_published_total{vhost="/",queue="<queue-name>",vhost="/",exchange="<exchange-name>"} 19

Versions used:

  • rabbitmq:4.0.0-management-alpine
  • prom/prometheus:v2.54.1

This seems to be a regression compared to 3.13.7 which we upgraded from.

Reproduction steps

  1. Enable the rabbitmq_prometheus plugin
  2. Send some messages to a queue so the rabbitmq_queue_exchange_messages_published_total metric is included
  3. Query the /metrics/per-object endpoint

Expected behavior

There should not be duplicate labels.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions