influxdb + cadvisor + grafana 监控 docker容器应用性能

influxdb + cadvisor + grafana 监控 docker容器应用性能

version: '3'
services:
    influxdb:
        image: influxdb
        container_name: influxdb
        restart: always
        environment:
             - PRE_CREATE_DB=cadvisor
        ports:
             - "8083:8083"
             - "8086:8086"
        expose:
             - "8090"
             - "8099"
        volumes:
             - /data:/data
    cadvisor:
        image: google/cadvisor
        container_name: cadvisor
        links:
             - influxdb:influx
        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:influx
        ports:
             - "3000:3000"
        environment:
             - HTTP_USER=admin
             - HTTP_PASS=admin
             - INFLUXDB_HOST=influxsrv
             - INFLUXDB_PORT=8086
             - INFLUXDB_NAME=cadvisor
             - INFLUXDB_USER=root
             - INFLUXDB_PASS=Password1!

 

posted @ 2020-04-07 16:15  何瑞  阅读(172)  评论(0编辑  收藏  举报