126 lines
3.0 KiB
YAML
126 lines
3.0 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
public: {}
|
|
private: {}
|
|
|
|
volumes:
|
|
grafana_lib: {}
|
|
grafana_ds:
|
|
|
|
services:
|
|
influxdb:
|
|
image: influxdb:alpine
|
|
container_name: influxdb
|
|
ports:
|
|
- "8086:8086"
|
|
networks:
|
|
- public
|
|
- private
|
|
volumes:
|
|
- ./data/influxdb:/var/lib/influxdb
|
|
environment:
|
|
INFLUXDB_REPORTING_DISABLED: "true"
|
|
INFLUXDB_DB: telegraf
|
|
INFLUXDB_USER: telegraf
|
|
INFLUXDB_USER_PASSWORD: nimda
|
|
|
|
grafana:
|
|
image: grafana/grafana:5.1.3
|
|
container_name: grafana
|
|
ports:
|
|
- "3001:3000"
|
|
networks:
|
|
- public
|
|
- private
|
|
volumes:
|
|
- grafana_lib:/var/lib/grafana
|
|
- ${PWD}/grafana/:/var/lib/grafana/ds/
|
|
environment:
|
|
GF_AUTH_ANONYMOUS_ENABLED: "true"
|
|
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
|
|
INFLUXDB_URI: "http://influxdb:8086"
|
|
INFLUXDB_DB: telegraf
|
|
INFLUXDB_USER: telegraf
|
|
INFLUXDB_USER_PASSWORD: nimda
|
|
command: ["bash", "/var/lib/grafana/ds/add_datasources.sh"]
|
|
|
|
telegraf:
|
|
image: telegraf:1.6-alpine
|
|
container_name: telegraf
|
|
network_mode: "host"
|
|
volumes:
|
|
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
|
- /var/run/utmp:/var/run/utmp:ro
|
|
environment:
|
|
# real influx host
|
|
INFLUXDB_URI: "http://localhost:8086"
|
|
|
|
prometheus:
|
|
image: quay.io/prometheus/prometheus:v2.0.0
|
|
container_name: prometheus
|
|
volumes:
|
|
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
links:
|
|
- cadvisor:cadvisor
|
|
- alertmanager:alertmanager
|
|
networks:
|
|
- private
|
|
- public
|
|
command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus"
|
|
ports:
|
|
- 9090:9090
|
|
depends_on:
|
|
- node_exporter
|
|
|
|
node_exporter:
|
|
image: prom/node-exporter:v0.13.0
|
|
container_name: node_exporter
|
|
volumes:
|
|
- ${PWD}/node_exporter/justrun.py:/justrun.py:rw
|
|
- ${PWD}/node_exporter/hmon:/hmon:rw
|
|
- ${PWD}/node_exporter/smoothlogging:/smoothlogging:rw
|
|
- ${PWD}/node_exporter/textfile_collector:/var/lib/node_exporter/textfile_collector/
|
|
networks:
|
|
- public
|
|
- private
|
|
environment:
|
|
PURPOSE: "PERFORMANCE_MONITORING"
|
|
expose:
|
|
- 9100
|
|
ports:
|
|
- 9100:9100
|
|
|
|
#
|
|
cadvisor:
|
|
image: google/cadvisor:v0.28.3
|
|
container_name: cadvisor
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:rw
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
|
|
restart: unless-stopped
|
|
expose:
|
|
- 8080
|
|
networks:
|
|
- private
|
|
- public
|
|
labels:
|
|
org.label-schema.group: "monitoring"
|
|
|
|
alertmanager:
|
|
image: prom/alertmanager
|
|
container_name: alertmanager
|
|
ports:
|
|
- 9093:9093
|
|
volumes:
|
|
- ./alertmanager/:/etc/alertmanager/
|
|
networks:
|
|
- private
|
|
restart: unless-stopped
|
|
command:
|
|
- '--config.file=/etc/alertmanager/config.yml'
|
|
- '--storage.path=/alertmanager'
|