Prometheus+Grafana+cAdvisor 监控 Docker 容器
Prometheus Grafana DevOps About 945 wordscAdvisor 下载地址
https://github.com/google/cadvisor/releases
添加可执行权限
chmod u+x cadvisor
后台启动
nohup /root/exporter/cadvisor -port=8080 > cadvisor.out 2>&1 &
可能出现的错误
解决办法:需要升级glibc
版本
/root/exporter/cadvisor: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /root/exporter/cadvisor)
cadvisor 默认端口
修改 Prometheus 配置
scrape_configs
下新增job_name
为cadvisor
(名称随意)
- job_name: 'cadvisor'
static_configs:
- targets: ['192.168.0.100:8080']
完整的scrape_configs
如下
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: 'cadvisor'
static_configs:
- targets: ['192.168.0.100:8080']
重启 Prometheus
重启后可查看cAdvisor
是否上线。
Grafana Dashboard
Docker and system monitoring: https://grafana.com/grafana/dashboards/893
Docker Container: https://grafana.com/grafana/dashboards/11600
开源地址
Views: 2,489 · Posted: 2022-03-01
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...