-
Notifications
You must be signed in to change notification settings - Fork 5.8k
inputs.mysql: field type conflict: input field "gtid_mode" - string vs integer #6646
Copy link
Copy link
Closed
Labels
Milestone
Description
Relevant telegraf.conf:
[[inputs.mysql]]
servers = ["monitoring:xxx@tcp(hostname:3306)/?tls=false"]
metric_version = 2
interval_slow = "1m"System info:
Telegraf 1.12.4
Remote mysql version: 5.7.22-log, 5.7.26-log
The two mysql servers are Amazon RDS in master-slave setup. It should be reproducible outside AWS as well.
Steps to reproduce:
Monitor two mysql servers with different gtid_mode variable. One with boolean-like value and the other without.
mysql> show global variables like '%gtid_mode%';
+---------------+----------------+
| Variable_name | Value |
+---------------+----------------+
| gtid_mode | OFF_PERMISSIVE |
+---------------+----------------+
mysql> show global variables like '%gtid_mode%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| gtid_mode | OFF |
+---------------+-------+
Expected behavior:
No errors.
Actual behavior:
Nov 11 18:12:09 monitoring telegraf[8487]: 2019-11-11T18:12:09Z E! [outputs.influxdb] when writing to [https://influxdb.foo.com:8086]: received error partial write: field type conflict: input field "gtid_mode" on measurement "mysql_variables" is type string, already exists as type integer dropped=1; discarding points
Additional info:
From the MySQL doc, it seems that gtid_mode could contain four different values and should never be treated as boolean. I guess, that's where this integer is coming from.
Reactions are currently unavailable