-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathcompose.monitoring.yml
More file actions
106 lines (102 loc) · 3.83 KB
/
Copy pathcompose.monitoring.yml
File metadata and controls
106 lines (102 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
services:
prometheus:
image: docker.io/prom/prometheus:${PROMETHEUS_VERSION:-v3.4.2}
restart: always
user: root
command:
- --web.console.templates=/usr/share/prometheus/consoles
- --config.file=/etc/prometheus/prometheus.yml
- --web.enable-lifecycle
- --web.listen-address=:9090
- --storage.tsdb.path=/prometheus/data
- --config.auto-reload-interval=30s
- --auto-gomaxprocs
- --storage.tsdb.retention.size=${PROMETHEUS_RETENTION_SIZE:-15GB} # this full docker compose should use around 100MB per day for 30s scrape interval
- --storage.tsdb.retention.time=${PROMETHEUS_RETENTION_TIME:-15d}
expose:
- 9090
ports:
- ${PROMETHEUS_LISTEN_ADDR:-127.0.0.1}:${PROMETHEUS_PORT:-9090}:9090
volumes:
- prometheus_tsdb:/prometheus:rw
- ./files/prometheus:/etc/prometheus:Z
# healthcheck:
# test: ["CMD", "nc", "-zv", "-w", "10", "localhost", "9090"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 10s
logging:
driver: "json-file"
labels:
container_tag: "${COMPOSE_PROJECT_NAME:-rocketchat}#prometheus"
node-exporter:
image: docker.io/prom/node-exporter:${NODE_EXPORTER_VERSION:-v1.9.1}
restart: always
privileged: true # Required for accessing host metrics
network_mode: host # Allows Node Exporter to access host network interfaces directly
pid: host # Allows Node Exporter to access host process information
volumes:
- /sys:/host/sys:ro # Mounts the /sys filesystem for system metrics
- /proc:/host/proc:ro # Mounts the /proc filesystem for process metrics
- /dev:/host/dev:ro # Mounts the /dev filesystem for device metrics
command:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)
expose:
- 9100
logging:
driver: "json-file"
labels:
container_tag: "${COMPOSE_PROJECT_NAME:-rocketchat}#node-exporter"
loki:
image: docker.io/grafana/loki:3.6
command: -config.file=/etc/loki/config.yaml -config.expand-env=true
user: "0"
volumes:
- ./files/loki/config.yaml:/etc/loki/config.yaml:z
- loki_data:/data/loki:rw
logging:
driver: "json-file"
labels:
container_tag: "${COMPOSE_PROJECT_NAME:-rocketchat}#loki"
opentelemetry-logs-collector:
image: docker.io/otel/opentelemetry-collector-contrib:0.143.0
command: ["--config=/etc/otel-collector-config.yaml"]
user: "0"
volumes:
- ./files/opentelemetry/config.yaml:/etc/otel-collector-config.yaml:z
logging:
driver: none
# volumes:
# - ./files/opentelemetry/config.yaml:/etc/otel-collector-config.yaml:ro
# - ${CONTAINER_LOGS_PATH:/var/lib/docker/containers}:/hostfs/storage:ro,z
# - ${DOCKER_SOCK_PATH:/var/run/docker.sock}:/var/run/docker.sock:ro,z
grafana:
image: docker.io/grafana/grafana:${GRAFANA_VERSION:-12.0.2}
restart: always
expose:
- 3000
ports:
- "${GRAFANA_BIND_IP:-0.0.0.0}:${GRAFANA_HOST_PORT:-5050}:3000"
volumes:
- grafana_data:/var/lib/grafana:Z
- ./files/grafana/dashboards:/dashboards:Z
- ./files/grafana/provisioning/:/etc/grafana/provisioning:Z
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-rc-admin}
- GF_AUTH_ANONYMOUS_ENABLED=false
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
- GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
- GF_SERVER_SERVE_FROM_SUB_PATH=true
- GF_SERVER_ROOT_URL=http://${GRAFANA_DOMAIN}${GRAFANA_PATH}/
logging:
driver: "json-file"
labels:
container_tag: "${COMPOSE_PROJECT_NAME:-rocketchat}#grafana"
volumes:
prometheus_tsdb: { driver: local }
prometheus_config: { driver: local }
grafana_data: { driver: local }
loki_data: { driver: local }