mportant; line-height: 32px !important; padding: 24px 0px 12px !important; color: rgb(24, 24, 24) !important;">Docker容器监控之CAdvisor+InfluxDB+Granfana
7.1原生命令
操作
问题
7.2是什么
一句话:CAdvisor监控收集+InfluxDB存储数据+Granfana展示图表
CAdvisor
InfluxDB
Granfana
总结
7.3 compose容器编排,一套带走
新建目录
新建3件套组合的docker-compose.yml
version: '3.1'volumes: grafana_data: { } services: influxdb: image: tutum/influxdb:0.9 restart: always environment: - PRE_CREATE_DB=cadvisor ports: - "8083:8083" - "8086:8086" volumes: - ./data/influxdb:/data cadvisor: image: google/cadvisor links: - influxdb:influxsrv command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxsrv:8086 restart: always ports: - "8080:8080" volumes: - /:/rootfs:ro - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro grafana: user: "104" image: grafana/grafana user: "104" restart: always links: - influxdb:influxsrv ports: - "3000:3000" volumes: - grafana_data:/var/lib/grafana environment: - HTTP_USER=admin - HTTP_PASS=admin - INFLUXDB_HOST=influxsrv - INFLUXDB_PORT=8086 - INFLUXDB_NAME=cadvisor - INFLUXDB_USER=root - INFLUXDB_PASS=root
启动docker-compose文件:docker-compose up
查看三个服务容器是否启动
测试-浏览cAdvisor收集服务,http://ip:8080/
测试-浏览influxdb存储服务,http://ip:8083/
测试-浏览grafana展现服务,http://ip:3000
ip+3000端口的方式访问,默认帐户密码(admin/admin)
配置步骤-配置数据源
配置步骤-选择influxdb数据源
配置步骤-配置细节1
配置步骤-配置细节2
配置步骤-配置面板panel1
配置步骤-配置面板panel2
配置步骤-配置面板panel3
配置步骤-配置面板panel4
配置步骤-配置面板panel5
配置步骤-配置面板panel6
本文链接:https://www.kinber.cn/post/4648.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: