Skip to content

Commit 07258d9

Browse files
committed
wip
1 parent 326e975 commit 07258d9

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

services/logging/docker-compose.aws.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ services:
1010
constraints:
1111
- node.labels.logging==true
1212
graylog:
13-
dns: # Add this always for AWS, otherwise we get "No such image: " for docker services
14-
8.8.8.8
1513
deploy:
1614
placement:
1715
constraints:

services/logging/loki.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server:
44
http_listen_port: 3100
55

66
common:
7-
path_prefix: /tmp/loki # Required for automatic directory resolution
7+
path_prefix: /tmp/loki # Required for internal directories
88

99
ingester:
1010
lifecycler:
@@ -18,22 +18,27 @@ schema_config:
1818
configs:
1919
- from: 2020-10-15
2020
store: tsdb
21-
object_store: filesystem
21+
object_store: s3
2222
schema: v13
2323
index:
2424
prefix: index_
2525
period: 24h
2626

2727
storage_config:
28-
tsdb_shipper: # Correct section name
29-
active_index_directory: /tmp/loki/tsdb-index
30-
cache_location: /tmp/loki/tsdb-cache
31-
filesystem:
32-
directory: /tmp/loki/chunks
28+
tsdb_shipper:
29+
active_index_directory: /tmp/loki/tsdb-index # Local cache for index metadata
30+
cache_location: /tmp/loki/tsdb-cache # Local cache for tsdb
31+
aws:
32+
s3: s3://${S3_BUCKET_NAME_LOKI}
33+
region: ${S3_REGION_LOKI}
34+
access_key_id: ${S3_ACCESS_KEY_LOKI}
35+
secret_access_key: ${S3_SECRET_KEY_LOKI}
36+
s3forcepathstyle: ${S3_FORCE_PATH_STYLE_LOKI} # Set to true if using MinIO or S3-compatible API; optional for AWS
37+
endpoint: ${S3_ENDPOINT_LOKI} # Optional; use for non-default endpoints
3338

34-
compactor: # Required for TSDB
39+
compactor:
3540
working_directory: /tmp/loki/compactor
3641
retention_enabled: false
3742

3843
limits_config:
39-
retention_period: 48h # Must be 24h and multiple of index period (24h)
44+
retention_period: ${LOKI_RETENTION_PERIOD} # must be >= 24h and multiple of index period (24h)

services/logging/template.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ GRAYLOG_LOG_MAX_DAYS_IN_STORAGE=${GRAYLOG_LOG_MAX_DAYS_IN_STORAGE}
1616
GRAYLOG_LOG_MIN_DAYS_IN_STORAGE=${GRAYLOG_LOG_MIN_DAYS_IN_STORAGE}
1717
PUBLIC_NETWORK=${PUBLIC_NETWORK}
1818
MONITORED_NETWORK=${MONITORED_NETWORK}
19+
LOKI_RETETION_PERIOD=${LOKI_RETETION_PERIOD}
20+
S3_ENDPOINT_LOKI=${S3_ENDPOINT_LOKI}
21+
S3_ACCESS_KEY_LOKI=${S3_ACCESS_KEY_LOKI}
22+
S3_BUCKET_NAME_LOKI=${S3_BUCKET_NAME_LOKI}
23+
S3_FORCE_PATH_STYLE_LOKI=${S3_FORCE_PATH_STYLE_LOKI}
24+
S3_REGION_LOKI=${S3_REGION_LOKI}
25+
S3_SECRET_KEY_LOKI=${S3_SECRET_KEY_LOKI}

0 commit comments

Comments
 (0)