windows下prometheus+mysqld_exporter+granafa监控mysql

安装mysqld_exporter

去官网下载对应版本:https://prometheus.io/download/
windows下prometheus+mysqld_exporter+granafa监控mysql
windows下prometheus+mysqld_exporter+granafa监控mysql

创建my.cnf文件

[client]
host=127.0.0.1
port=3306
user=root
password=root

创建 start.bat

mysqld_exporter.exe --config.my-cnf=my.cnf

windows下prometheus+mysqld_exporter+granafa监控mysql

访问:http://127.0.0.1:9104/metrics

windows下prometheus+mysqld_exporter+granafa监控mysql

修改prometheus.yml,加入任务,之后重启prometheus

  - job_name: 'mysql_metrics_localhost'
    static_configs:
    - targets: ['localhost:9104']

windows下prometheus+mysqld_exporter+granafa监控mysql

在grafana中,导入模版 id:12826

windows下prometheus+mysqld_exporter+granafa监控mysql

上一篇:Linux下MySQL配置文件失效


下一篇:deepin20.1系统安装MySQL8.0.23(超详细的MySQL8安装教程)