grafana+cadvisor+influxdb 使用docker-compose实现监控
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了grafana+cadvisor+influxdb 使用docker-compose实现监控相关的知识,希望对你有一定的参考价值。
//以下内容直接复制到 docker-compose.yml 文件中。执行命令docker-compose up -d之后访问 http://ip:3000 剩下的之后的测试连接数据库和监控自己百度
version: ‘3‘
services:
influxdb:
image: tutum/influxdb:0.9
container_name: influxdb
restart: always
environment:
- PRE_CREATE_DB=cadvisor
ports: - "8083:8083"
- "8086:8086"
expose: - "8090"
- "8099"
volumes: - influxdbData:/data
cadvisor:
image: google/cadvisor
container_name: 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:
image: grafana/grafana
container_name: grafana
restart: always
links: - influxdb:influxsrv
ports: - "3000:3000"
environment: - HTTP_USER=admin
- HTTP_PASS=admin
- INFLUXDB_HOST=influxsrv
- INFLUXDB_PORT=8086
- INFLUXDB_NAME=cadvisor
- INFLUXDB_USER=root
- INFLUXDB_PASS=root
volumes:
influxdbData:
以上是关于grafana+cadvisor+influxdb 使用docker-compose实现监控的主要内容,如果未能解决你的问题,请参考以下文章
InfluxDB+cAdvisor+Grafana配置Docker监控
Docker监控快速部署,cAdvisor+InfluxDB+Grafana
docker:十分钟构建容器监控系统cAdvisor+InfluxDB+Grafana
在Marathon 上部署 cAdvisor + InfluxDB + Grafana Docker监控