Skip to content

Prometheus output do not remove metric that are not published anymore #1334

@rvrignaud

Description

@rvrignaud

Bug report

System info:

Telegraf 0.13.1
Docker container : Ubuntu 16.04
Rabbitmq : 3.5.7

Steps to reproduce:

  1. Configure rabbitmq input on telegraf
  2. Configure prometheus output on telegraf
  3. Create an ephemeral queue on rabbitmq
  4. Publish a message
  5. Wait that telegraf get metrics
  6. Delete ephemeral queue
  7. Wait a bit
  8. Go to telegraf's prometheus output
  9. See that rabbitmq_queue_messages / rabbitmq_queue_messages_ready metric is not 0

Expected behavior:

As the queue no longer exists, telegraf should output 0 as message number for rabbitmq_queue_messages / rabbitmq_queue_messages_ready

Actual behavior:

I still see non zero metric for rabbitmq_queue_messages / rabbitmq_queue_messages_ready metrics of non existing queue.

Additional info:

With influxdb output, telegraf seems to stop sending the metric with the corresponding tag.

The problem of prometheus output not being refreshed / showing wrong metrics may be present for other input too.

Use case: [Why is this important (helps with prioritizing requests)]

This is important because we are sending metrics that are wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions