elasticsearchelastic-stackelkmetricbeatelastic-beats

ELK MetricBeat - Monitor remote mysqlDB


I have installed ELK stack (With metricbeat) on ServerA and want to monitor mysql on ServerB. I added db host details on ServerA mysql.yml metribeat module file (/etc/metricbeat/modules.d/mysql.yml)

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

  hosts: ["tcp(ServerB:3306)/"]

  username: mysql

  password:password

After I start the metricbeat instead of connecting to ServerB it tries to connect to localhost(ServerA) mysql.

below is the error

Error fetching data for metricset mysql.status: Error 1045: Access denied for user 'mysql'@'ServerA...sing password: YES)

Can someone help me with this?


Solution

  • It was an access issue once I grant required privileges I was able to connect.