Coletando metricas do mysql, importando no prometheus e visualizando no grafana dashboard
CREATE USER 'exporter'@'localhost' IDENTIFIED BY 'password' WITH MAX_USER_CONNECTIONS 3; GRANT PROCESS, REPLICATION CLIENT, SELECT ON . TO 'exporter'@'localhost';
Dicas: https://grafana.com/oss/prometheus/exporters/mysql-exporter/?tab=installation
tar xvfz mysqld_exporter-.-amd64.tar.gz cd mysqld_exporter-.-amd64
CREATE USER 'exporter'@'localhost' IDENTIFIED BY 'enter_password_here' WITH MAX_USER_CONNECTIONS 3; GRANT PROCESS, REPLICATION CLIENT, SELECT ON . TO 'exporter'@'localhost';
export DATA_SOURCE_NAME='exporter:enter_password_here@(mysql_hostname:3306)/'
./mysqld_exporter
[client]
user=exporter
password=password-exporter
host=mysql-server