Skip to content

Commit dd1b18a

Browse files
committed
#115 Set Loki retention period
1 parent ce86c0f commit dd1b18a

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

backend/loki/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM grafana/loki
2+
3+
COPY ./config.yaml /etc/loki/local-config.yaml

backend/loki/config.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
auth_enabled: false
2+
3+
server:
4+
http_listen_port: 3100
5+
6+
common:
7+
instance_addr: 127.0.0.1
8+
path_prefix: /loki
9+
storage:
10+
filesystem:
11+
chunks_directory: /loki/chunks
12+
rules_directory: /loki/rules
13+
replication_factor: 1
14+
ring:
15+
kvstore:
16+
store: inmemory
17+
18+
compactor:
19+
working_directory: /loki/retention
20+
compaction_interval: 10m
21+
retention_enabled: true
22+
retention_delete_delay: 2h
23+
retention_delete_worker_count: 32
24+
delete_request_store: filesystem
25+
26+
schema_config:
27+
configs:
28+
- from: 2020-10-24
29+
store: tsdb
30+
object_store: filesystem
31+
schema: v13
32+
index:
33+
prefix: index_
34+
period: 24h
35+
36+
limits_config:
37+
retention_period: 72h
38+
39+
ruler:
40+
alertmanager_url: http://localhost:9093

compose.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ services:
178178
tty: true
179179
hostname: prometheus.dating.se.ifmo.ru
180180
loki:
181-
image: grafana/loki
181+
image: ghcr.io/secs-dev/itmo-dating-loki:latest
182+
build:
183+
context: ./backend/loki
182184
command: -config.file=/etc/loki/local-config.yaml
183185
volumes:
184186
- loki-data:/loki

0 commit comments

Comments
 (0)