常用 Exporter 部署
Node-exporter 部署
1 | # 下载安装包 |
Prometheus 配置修改
1 | - job_name: 'node-exporter' |
Grafana 配置图标
1 | https://grafana.com/grafana/dashboards/8919 |
Mysql-exporter 部署
宿主机 mysql-client 下载
1 | 由于不想在mysql容器中安装exporter,所以在宿主机安装 mysql client |
下载 Mysql_export
1 | wget https://github.com/prometheus/mysqld_exporter/releases/download/v0.12.1/mysqld_exporter-0.12.1.linux-amd64.tar.gz |
创建连接数据库的配置文件
1 | cd mysqld_exporter-0.12.1 |
启动服务
1 | ./mysqld_exporter --config.my-cnf="./my.cnf" |
Prometheus 配置修改
1 | - job_name: 'mysql-exporter' |
grafana 配置图表
1 | 地址: https://grafana.com/grafana/dashboards/11323 |
Redis_exporter 部署
1 | https://github.com/oliver006/redis_exporter/releases/download/v1.43.1/redis_exporter-v1.43.1.linux-amd64.tar.gz |
配置启动脚本
1 | [root@csm redis_exporter]# cat start.sh |
Prometheus 配置修改
1 | - job_name: 'redis-exporter' |
Grafana
1 | # 地址: https://github.com/oliver006/redis_exporter |
Rabbitmq 部署
1 | wget https://github.com/kbudde/rabbitmq_exporter/releases/download/v1.0.0-RC19/rabbitmq_exporter_1.0.0-RC19_linux_amd64.tar.gz |
启动 export
1 | RABBIT_USER=root RABBIT_PASSWORD=123456 OUTPUT_FORMAT=JSON RABBIT_URL=http://192.168.2.90:15672 ./rabbitmq_exporter & |
Prometheus 配置添加
1 | - job_name: 'rabbitmq-exporter' |
Grafana
1 | # 单节点的要用这个ID |