-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.analytics.yml
More file actions
162 lines (146 loc) · 4.37 KB
/
Copy pathdocker-compose.analytics.yml
File metadata and controls
162 lines (146 loc) · 4.37 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: 'analytics'
version: '3.8'
services:
loki:
container_name: loki
image: grafana/loki:latest
restart: always
ports:
- '3100:3100'
command: -config.file=/etc/loki/local-config.yaml
networks:
- loki
promtail:
container_name: promtail
image: grafana/promtail:latest
restart: always
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml
networks:
- loki
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: always
ports:
- '9090:9090'
volumes:
- prometheus_data:/prometheus
configs:
- source: prometheus_config
target: /etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
networks:
- loki
- cmnw
postgres_exporter:
container_name: postgres_exporter
image: prometheuscommunity/postgres-exporter:latest
restart: always
ports:
- '9187:9187'
environment:
DATA_SOURCE_NAME: ${DATA_SOURCE_NAME}
PG_EXPORTER_WEB_LISTEN_ADDRESS: ":9187"
PG_EXPORTER_WEB_TELEMETRY_PATH: "/metrics"
PG_EXPORTER_DISABLE_SETTINGS_METRICS: false
networks:
- loki
grafana:
container_name: grafana
image: grafana/grafana:latest
restart: always
environment:
GF_PATHS_PROVISIONING: ${GF_PATHS_PROVISIONING}
GF_AUTH_ANONYMOUS_ENABLED: ${GF_AUTH_ANONYMOUS_ENABLED}
GF_AUTH_ANONYMOUS_ORG_ROLE: ${GF_AUTH_ANONYMOUS_ORG_ROLE}
GF_FEATURE_TOGGLES_ENABLE: ${GF_FEATURE_TOGGLES_ENABLE}
GF_PLUGIN_GRAFANA_IMAGE_RENDERER_RENDERING_IGNORE_HTTPS_ERRORS: true
GF_PLUGIN_PUBLIC_KEY_RETRIEVAL_DISABLED: true
GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES: false
GF_ANALYTICS_CHECK_FOR_UPDATES: false
GF_INSTALL_IMAGE_RENDERER_PLUGIN: false
# Force Grafana to trust the proxy (Traefik) for HTTPS
GF_SERVER_ROOT_URL: https://grafana.cmnw.ru
GF_SERVER_PROTOCOL: http
ports:
- '3000:3000'
volumes:
- grafana:/var/lib/grafana
networks:
- loki
- cmnw
# Traefik egress
networks:
loki:
driver: bridge
cmnw:
external: true
volumes:
grafana:
prometheus_data:
configs:
prometheus_config:
content: |
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['127.0.0.1:9090']
- job_name: 'postgres'
static_configs:
- targets: ['128.0.0.255:9187']
scrape_interval: 15s
metrics_path: /metrics
- job_name: 'rabbitmq'
static_configs:
- targets: ['128.0.0.255:15692']
scrape_interval: 15s
metrics_path: /metrics
scheme: http
- job_name: 'minio'
bearer_token: <secret>
metrics_path: /minio/v2/metrics/cluster
scheme: http
static_configs:
- targets: ['minio:9000']
- job_name: 'nginx'
static_configs:
- targets: ['128.0.0.255:9113']
scrape_interval: 15s
metrics_path: /metrics
- job_name: 'home-assistant'
metrics_path: /api/prometheus
scheme: http
static_configs:
- targets: ['128.0.0.255:8123']
# If Home Assistant's /api/prometheus requires authentication (not using requires_auth: false)
# uncomment and configure one of the following:
# authorization:
# credentials: 'YOUR_LONG_LIVED_ACCESS_TOKEN' # Replace with your HA token
# OR (for older Prometheus versions, less secure)
# bearer_token: 'YOUR_LONG_LIVED_ACCESS_TOKEN'
- job_name: 'cmnw-api'
static_configs:
- targets: ['cmnw-api:8080']
scrape_interval: 15s
metrics_path: /api/metrics
scheme: http
- job_name: 'qdrant'
static_configs:
- targets: ['128.0.0.255:6333']
scrape_interval: 15s
metrics_path: /metrics
scheme: http