File tree Expand file tree Collapse file tree 4 files changed +45
-39
lines changed
{{cookiecutter.repostory_name}} Expand file tree Collapse file tree 4 files changed +45
-39
lines changed Original file line number Diff line number Diff line change 70
70
- [ Sentry] ( https://sentry.io ) error tracking preconfigured
71
71
- Grafana for metrics and log aggregation (Grafana Loki)
72
72
- Prometheus for data collection
73
- - Grafana Loki for log aggregation with Promtail for log shipping
73
+ - Grafana Loki for log aggregation with Alloy for log shipping
74
74
- Generic host dashboard section optimized for both VM and physical machines
75
75
- [ Integration of framework allowing easy addition of new application-level metrics] ( https://github.com/reef-technologies/django-business-metrics )
76
76
- nginx-level dashboard section for http/ws statistics
Original file line number Diff line number Diff line change
1
+ discovery.docker "containerlogs" {
2
+ host = "unix:///var/run/docker.sock"
3
+ }
4
+
5
+ discovery.relabel "containerlogs" {
6
+ targets = []
7
+
8
+ rule {
9
+ source_labels = ["__meta_docker_container_name"]
10
+ regex = "/(.*)"
11
+ target_label = "container"
12
+ }
13
+
14
+ rule {
15
+ source_labels = ["__meta_docker_container_log_stream"]
16
+ target_label = "logstream"
17
+ }
18
+ }
19
+
20
+ loki.source.docker "containerlogs" {
21
+ host = "unix:///var/run/docker.sock"
22
+ targets = discovery.docker.containerlogs.targets
23
+ forward_to = [loki.write.default.receiver]
24
+ relabel_rules = discovery.relabel.containerlogs.rules
25
+ }
26
+
27
+ loki.write "default" {
28
+ endpoint {
29
+ url = sys.env("LOKI_URL") + "/loki/api/v1/push"
30
+
31
+ basic_auth {
32
+ username = sys.env("LOKI_USER")
33
+ password = sys.env("LOKI_PASSWORD")
34
+ }
35
+ }
36
+ }
Original file line number Diff line number Diff line change @@ -238,23 +238,21 @@ services:
238
238
{% endif %}
239
239
240
240
{% if cookiecutter.log_aggregating == 'y' %}
241
- promtail :
242
- image : grafana/promtail:2.9.2
241
+ alloy :
242
+ image : grafana/alloy:v1.8.3
243
243
restart : unless-stopped
244
244
environment :
245
245
- LOKI_URL=${LOKI_URL}
246
- - LOKI_REFRESH_INTERVAL=${LOKI_REFRESH_INTERVAL}
247
246
- LOKI_USER=${LOKI_USER}
248
247
- LOKI_PASSWORD=${LOKI_PASSWORD}
249
- - LOKI_CLIENT=${LOKI_CLIENT}
250
- - LOKI_CLIENT_SERVER_GROUP=${LOKI_CLIENT_SERVER_GROUP}
251
248
volumes :
252
- - ./promtail :/etc/promtail
249
+ - ./alloy :/etc/alloy
253
250
- /var/run/docker.sock:/var/run/docker.sock:ro
254
- - promtail -data:/var/lib/promtail
251
+ - alloy -data:/var/lib/alloy
255
252
command :
256
- - -config.file=/etc/promtail/config.yml
257
- - -config.expand-env=true
253
+ - run
254
+ - --storage.path=/var/lib/alloy/data
255
+ - /etc/alloy/config.alloy
258
256
logging :
259
257
<< : *logging
260
258
{% endif %}
@@ -286,4 +284,4 @@ volumes:
286
284
backups :
287
285
gunicorn-socket :
288
286
nodeexporter_collectors :
289
- promtail -data :
287
+ alloy -data :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments