Skip to content

Upgrade to 1.6.1 leads to slave_Seconds_Behind_Master no longer being populated. #4104

@nsteinmetz

Description

@nsteinmetz

As i said on slack: since upgrade to Telegraf 1.6.1 (from 1.5.3), I lost the slave_Seconds_Behind_Master. Other change I made was on InfluxDB side to upgrade from 1.5.1 to 1.5.2.

All the other data I use seems there.

Relevant telegraf.conf:

Original setup :

[[inputs.mysql]]
servers = ["telegraf:REDACTED@unix(/var/run/mysqld/mysqld.sock)/"]
table_schema_databases = []
gather_table_schema = true
gather_user_statistics = true
gather_process_list = true
gather_slave_status = true
gather_innodb_metrics = true

With the new metric:

[[inputs.mysql]]
servers = ["telegraf:REDACTED@unix(/var/run/mysqld/mysqld.sock)/"]
table_schema_databases = []
gather_table_schema = true
gather_user_statistics = true
gather_process_list = true
gather_slave_status = true
gather_innodb_metrics = true

[[inputs.mysql]]
name_suffix= "_2"
metric_version = 2

servers = ["telegraf:REDACTED@unix(/var/run/mysqld/mysqld.sock)/"]
table_schema_databases = []
gather_table_schema = true
gather_user_statistics = true
gather_process_list = true
gather_slave_status = true
gather_innodb_metrics = true

System info:

Telegraf version : 1.6.1
Debian 9.x Stretch up to date 64 bits
MariaDB 10.1.25

Steps to reproduce:

Till I did the upgrade:

> SELECT last("slave_Seconds_Behind_Master") FROM "mysql" WHERE ("host" = 'codb2d9')
name: mysql
time                last
----                ----
1525419720000000000 0

Timestamp is when I did the upgrade. No more entry since.

After upgrading metric, no data either

> SELECT last("slave_Seconds_Behind_Master") FROM "mysql" WHERE ("host" = 'codb2d9')
name: mysql
time                last
----                ----
1525419720000000000 0
> SELECT last("slave_Seconds_Behind_Master") FROM "mysql_2" WHERE ("host" = 'codb2d9')
>

Expected behavior:

Having updated values for slave_Seconds_Behind_Master

Actual behavior:

No value for slave_Seconds_Behind_Master

Additional info:

   Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-05-04 10:42:32 CEST; 3h 45min ago
     Docs: https://github.com/influxdata/telegraf
 Main PID: 17352 (telegraf)
    Tasks: 24 (limit: 4915)
   CGroup: /system.slice/telegraf.service
           └─17352 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

May 04 14:23:00 codb2d9 telegraf[17352]: 2018-05-04T12:23:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:24:00 codb2d9 telegraf[17352]: 2018-05-04T12:24:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:25:00 codb2d9 telegraf[17352]: 2018-05-04T12:25:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:25:00 codb2d9 telegraf[17352]: 2018-05-04T12:25:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:26:00 codb2d9 telegraf[17352]: 2018-05-04T12:26:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:26:00 codb2d9 telegraf[17352]: 2018-05-04T12:26:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:27:00 codb2d9 telegraf[17352]: 2018-05-04T12:27:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:27:00 codb2d9 telegraf[17352]: 2018-05-04T12:27:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:28:00 codb2d9 telegraf[17352]: 2018-05-04T12:28:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'
May 04 14:28:00 codb2d9 telegraf[17352]: 2018-05-04T12:28:00Z E! MySQL Error gathering user stats: Error 1054: Unknown column 'rows_fetched' in 'field list'```

But seems related to #2910.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions