16417: Pillar & state to install and configure Loki in the monitoring node.
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / loki.sls
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 {%- set aws_key_id = "__LOKI_AWS_S3_ACCESS_KEY_ID__" %}
6 {%- set aws_secret = "__LOKI_AWS_S3_SECRET_ACCESS_KEY__" %}
7 {%- set aws_region = "__LOKI_AWS_REGION__" %}
8 {%- set aws_s3_bucket = "__LOKI_AWS_S3_BUCKET__" %}
9 {%- set log_retention = "__LOKI_LOG_RETENTION_TIME__" %}
10 {%- set data_path = "/var/lib/loki" %}
11
12 loki:
13   enabled: True
14   package: "loki"
15   service: "loki"
16   config_path: "/etc/loki/config.yml"
17   data_path: {{ data_path }}
18   config_contents: |
19     ########################################################################
20     # File managed by Salt. Your changes will be overwritten.
21     ########################################################################
22     server:
23       http_listen_port: 3100
24       grpc_listen_port: 9096
25
26     common:
27       instance_addr: 127.0.0.1
28       path_prefix: {{ data_path }}
29       storage:
30         filesystem:
31           chunks_directory: {{ data_path }}/chunks
32           rules_directory: {{ data_path }}/rules
33       replication_factor: 1
34       ring:
35         kvstore:
36           store: inmemory
37
38     query_range:
39       results_cache:
40         cache:
41           embedded_cache:
42             enabled: true
43             max_size_mb: 100
44
45     storage_config:
46       tsdb_shipper:
47         active_index_directory: {{ data_path }}/index
48         cache_location: {{ data_path }}/index_cache
49         cache_ttl: 24h
50       aws:
51         s3: s3://{{ aws_key_id }}:{{ aws_secret }}@{{ aws_region }}
52         bucketnames: {{ aws_s3_bucket }}
53
54     schema_config:
55       configs:
56         - from: 2024-01-01
57           store: tsdb
58           object_store: aws
59           schema: v13
60           index:
61             prefix: index_
62             period: 24h
63
64     limits_config:
65       retention_period: {{ log_retention }}
66
67     compactor:
68       working_directory: {{ data_path }}/retention
69       delete_request_store: aws
70       retention_enabled: true
71       compaction_interval: 10m
72       retention_delete_delay: 2h
73       retention_delete_worker_count: 100
74
75     frontend:
76       encoding: protobuf
77
78     analytics:
79       reporting_enabled: false