File tree Expand file tree Collapse file tree 3 files changed +21
-11
lines changed Expand file tree Collapse file tree 3 files changed +21
-11
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 44 http_listen_port : 3100
55
66common :
7- path_prefix : /tmp/loki # Required for automatic directory resolution
7+ path_prefix : /tmp/loki # Required for internal directories
88
99ingester :
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
2727storage_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
3843limits_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)
Original file line number Diff line number Diff line change @@ -16,3 +16,10 @@ GRAYLOG_LOG_MAX_DAYS_IN_STORAGE=${GRAYLOG_LOG_MAX_DAYS_IN_STORAGE}
1616GRAYLOG_LOG_MIN_DAYS_IN_STORAGE = ${ GRAYLOG_LOG_MIN_DAYS_IN_STORAGE }
1717PUBLIC_NETWORK = ${ PUBLIC_NETWORK }
1818MONITORED_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 }
You can’t perform that action at this time.
0 commit comments