|
| 1 | +version: '3.2' |
| 2 | + |
| 3 | +services: |
| 4 | + prometheus: |
| 5 | + image: prom/prometheus:latest |
| 6 | + container_name: prometheus |
| 7 | + restart: unless-stopped |
| 8 | + ports: |
| 9 | + - '9090:9090' |
| 10 | + user: '0' |
| 11 | + command: |
| 12 | + - '--config.file=/etc/prometheus/prometheus.yml' |
| 13 | + - '--storage.tsdb.path=/prometheus/data' |
| 14 | + - '--storage.tsdb.retention=90d' |
| 15 | + - '--web.enable-lifecycle' |
| 16 | + volumes: |
| 17 | + - ./etc/prometheus:/etc/prometheus |
| 18 | + - ./data/prometheus/data:/prometheus/data |
| 19 | + # depends_on: |
| 20 | + # - cadvisor |
| 21 | + |
| 22 | + # cadvisor: |
| 23 | + # image: google/cadvisor:latest |
| 24 | + # container_name: cadvisor |
| 25 | + # restart: unless-stopped |
| 26 | + # ports: |
| 27 | + # - '8080:8080' |
| 28 | + # volumes: |
| 29 | + # - /:/rootfs:ro |
| 30 | + # - /var/run:/var/run:rw |
| 31 | + # - /sys:/sys:ro |
| 32 | + # - /var/lib/docker/:/var/lib/docker:ro |
| 33 | + |
| 34 | + node-exporter: |
| 35 | + image: prom/node-exporter:latest |
| 36 | + container_name: node-exporter |
| 37 | + restart: unless-stopped |
| 38 | + ports: |
| 39 | + - '9100:9100' |
| 40 | + command: |
| 41 | + - '--path.procfs=/host/proc' |
| 42 | + - '--path.sysfs=/host/sys' |
| 43 | + - '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)' |
| 44 | + - '--collector.textfile.directory=/node_exporter/prom' |
| 45 | + volumes: |
| 46 | + - /proc:/host/proc |
| 47 | + - /sys:/host/sys |
| 48 | + - /:/rootfs |
| 49 | + - ./etc/node_exporter/prom:/node_exporter/prom |
| 50 | + |
| 51 | + node-exporter-01: |
| 52 | + image: prom/node-exporter:latest |
| 53 | + container_name: node-exporter-01 |
| 54 | + restart: unless-stopped |
| 55 | + ports: |
| 56 | + - '9101:9100' |
| 57 | + command: |
| 58 | + - '--path.procfs=/host/proc' |
| 59 | + - '--path.sysfs=/host/sys' |
| 60 | + - '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)' |
| 61 | + - '--collector.textfile.directory=/node_exporter/prom' |
| 62 | + volumes: |
| 63 | + - /proc:/host/proc |
| 64 | + - /sys:/host/sys |
| 65 | + - /:/rootfs |
| 66 | + - ./etc/node_exporter/prom:/node_exporter/prom |
| 67 | + |
| 68 | + grafana: |
| 69 | + image: grafana/grafana:8.5.11 |
| 70 | + container_name: grafana |
| 71 | + restart: unless-stopped |
| 72 | + ports: |
| 73 | + - '3000:3000' |
| 74 | + user: '0' |
| 75 | + volumes: |
| 76 | + - ./data/grafana8:/var/lib/grafana |
| 77 | + - ./etc/grafana/grafana.ini:/etc/grafana/grafana.ini |
| 78 | + environment: |
| 79 | + - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=vertamedia-clickhouse-datasource |
| 80 | + - GF_SECURITY_ADMIN_PASSWORD=password |
| 81 | + - GF_USERS_ALLOW_SIGN_UP=false |
| 82 | + |
| 83 | + prometheusalert: |
| 84 | + image: feiyu563/prometheus-alert:latest |
| 85 | + container_name: prometheusalert |
| 86 | + restart: unless-stopped |
| 87 | + ports: |
| 88 | + - '8080:8080' |
| 89 | + user: '0' |
| 90 | + volumes: |
| 91 | + - ./etc/prometheusalert/app.conf:/app/conf/app.conf |
| 92 | + environment: |
| 93 | + - GF_SECURITY_ADMIN_PASSWORD=password |
| 94 | + - PA_LOGIN_USER=prometheusalert |
| 95 | + - PA_LOGIN_PASSWORD=prometheusalert |
| 96 | + - PA_TITLE=PrometheusAlert |
| 97 | + - PA_OPEN_FEISHU=1 |
| 98 | + - PA_OPEN_DINGDING=1 |
| 99 | + - PA_OPEN_WEIXIN=1 |
| 100 | + |
| 101 | + clickhouse: |
| 102 | + image: yandex/clickhouse-server |
| 103 | + container_name: clickhouse |
| 104 | + restart: unless-stopped |
| 105 | + ports: |
| 106 | + - 34424:34424 |
| 107 | + - 9000:9000 |
| 108 | + - 9009:9009 |
| 109 | + - 8123:8123 |
| 110 | + user: '0' |
| 111 | + volumes: |
| 112 | + - ./data/clickhouse/data:/var/lib/clickhouse |
| 113 | + ulimits: |
| 114 | + nofile: |
| 115 | + soft: 262144 |
| 116 | + hard: 262144 |
| 117 | + |
| 118 | + blackbox: |
| 119 | + image: prom/blackbox-exporter:latest |
| 120 | + container_name: blackbox |
| 121 | + restart: unless-stopped |
| 122 | + command: |
| 123 | + - "--config.file=/etc/blackbox/blackbox.yml" |
| 124 | + ports: |
| 125 | + - 9115:9115 |
| 126 | + user: '0' |
| 127 | + volumes: |
| 128 | + - ./etc/blackbox/blackbox.yml:/etc/blackbox/blackbox.yml |
0 commit comments