Prometheus+Grafana+cAdvisor 监控 Docker 容器
Prometheus Grafana DevOps 大约 945 字cAdvisor 下载地址
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
开源地址
阅读 984 · 发布于 2022-03-01
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
OpenResty lua-resty-auto-ssl: failed to set ocsp stapling for阅读 1661
-
Spring Boot 打包本地 jar 包到 war 包中阅读 1318
-
JMeter 当前接口请求失败停止请求下一个接口阅读 2003
-
Golang 操作 csv阅读 1071
-
MySQL/Oracle 更新或替换字符串字段中的部分内容阅读 2733
-
Golang 数字转字符串阅读 1026
-
设计模式之装饰者模式阅读 1620
-
IDEA 远程 Debug Tomcat阅读 1724
-
IDEA Debug 查看方法返回值阅读 2436
-
OpenResty 使用 Certbot 生成 SSL 证书阅读 1918