Skip to content

database routing breaks at a restart of InfluxDB #6471

Closed
@x70b1

Description

@x70b1

I setup database routing. Every service (MySQL, RabbitMQ and Jenkins) should use it's own database in InfluxDB. The used config is attached.
This works good so far.

If I restart the influxdb service the routing is broken for 3 to 4 data points (Interval is 10s).
This means that every collected data point is written to every configured database.

  • I got 3 to 4 MySQL, RabbitMQ and Jenkins data points in my MySQL database.
  • I got 3 to 4 MySQL, RabbitMQ and Jenkins data points in my RabbitMQ database.
  • I got 3 to 4 MySQL, RabbitMQ and Jenkins data points in my Jenkins database.

This is not a very critical error but it's causing confusion.
Also I am not sure if this is a problem with Telegraf, because InfluxDB is also involved.

I could not find any logs related to this. There are lines like read: connection reset by peer. But that's what I'm expecting.

Relevant telegraf.conf:

[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  username = "telegraf"
  password = "xxx"
  database = "RabbitMq"

  skip_database_creation = true
  database_tag = "influxdb_database"
  exclude_database_tag = true

[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  username = "telegraf"
  password = "xxx"
  database = "Jenkins"

  skip_database_creation = true
  database_tag = "influxdb_database"
  exclude_database_tag = true

[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  username = "telegraf"
  password = "xxx"
  database = "Mysql"

  skip_database_creation = true
  database_tag = "influxdb_database"
  exclude_database_tag = true

[[inputs.rabbitmq]]
  url = "https://rabbit.example.org"
  username = "xxx"
  password = "xxx"

  [inputs.rabbitmq.tags]
    influxdb_database = "RabbitMq"

[[inputs.jenkins]]
  url = "https://example.com"
  username = "xxx"
  password = "xxx"

  [inputs.jenkins.tags]
    influxdb_database = "Jenkins"

[[inputs.mysql]]
  servers = ["xxx"]

  [inputs.mysql.tags]
    influxdb_database = "Mysql"

System info:

1.12.0 as Docker Container

Steps to reproduce:

  1. check the list of measurements in all 3 databases
  2. restart InfluxDB
  3. check the list of measurements in all 3 databases

Expected behavior:

Every database should contain its own measurements.

Actual behavior:

A small amount of values get the wrong database.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions