使用 Metricbeat 监控 Mysql 状态出现报错。

报错信息

image.png

配置信息

# Module: mysql
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.x/metricbeat-module-mysql.html

- module: mysql
  metricsets:
    - status 
    - galera_status
    - performance
    - query
  period: 10s

  # Host DSN should be defined as "user:pass@tcp(127.0.0.1:3306)/"
  # or "unix(/var/lib/mysql/mysql.sock)/",
  # or another DSN format supported by <https://github.com/Go-SQL-Driver/MySQL/>.
  # The username and password can either be set in the DSN or using the username
  # and password config options. Those specified in the DSN take precedence.
  hosts: ["tcp(127.0.0.1:3306)/"]
  username: root
  password: 123456

  # Username of hosts. Empty by default.
  #username: root

  # Password of hosts. Empty by default.
  #password: secret

暂时解决办法

把 query 注释掉就行了,但是不清楚原因,请大佬解答

- module: mysql
  metricsets:
    - status 
    - galera_status
    - performance
    # - query # 注释掉这行就行了
阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进