1
0

change grafana_loki role variable structure

This commit is contained in:
cuqmbr 2025-07-03 18:45:49 +03:00
parent 374bd0d69a
commit 0363813807
Signed by: cuqmbr
GPG Key ID: 1F62396D020F375C
4 changed files with 62 additions and 110 deletions

View File

@ -243,62 +243,14 @@ prometheus_alerting_rules:
description: "Clock not synchronising. Ensure NTP is configured on this host.\n VALUE = {{'{{'}} $value {{'}}'}}\n LABELS = {{'{{'}} $labels {{'}}'}}" description: "Clock not synchronising. Ensure NTP is configured on this host.\n VALUE = {{'{{'}} $value {{'}}'}}\n LABELS = {{'{{'}} $labels {{'}}'}}"
loki_settings:
loki_options: config:
auth_enabled: false auth_enabled: false
server:
server: http_listen_port: 3100
http_listen_port: 3100 log_level: info
grpc_listen_port: 9096 pattern_ingester:
log_level: info enabled: true
grpc_server_max_concurrent_streams: 1000
common:
instance_addr: 127.0.0.1
path_prefix: /tmp/loki
storage:
filesystem:
chunks_directory: /tmp/loki/chunks
rules_directory: /tmp/loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100
limits_config:
metric_aggregation_enabled: true
schema_config:
configs:
- from: 2020-10-24
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
pattern_ingester:
enabled: true
metric_aggregation:
loki_address: localhost:3100
ruler:
alertmanager_url: http://localhost:9093
frontend:
encoding: protobuf
analytics:
reporting_enabled: false
fluentbit_settings: fluentbit_settings:

View File

@ -1,56 +1,50 @@
--- ---
loki_options: loki_settings:
auth_enabled: false
server: loki_default_settings:
http_listen_port: 3100 config:
grpc_listen_port: 9096 auth_enabled: false
log_level: debug server:
grpc_server_max_concurrent_streams: 1000 http_listen_port: 3100
grpc_listen_port: 9096
common: log_level: debug
instance_addr: 127.0.0.1 grpc_server_max_concurrent_streams: 1000
path_prefix: /tmp/loki common:
storage: instance_addr: 127.0.0.1
filesystem: path_prefix: /tmp/loki
chunks_directory: /tmp/loki/chunks storage:
rules_directory: /tmp/loki/rules filesystem:
replication_factor: 1 chunks_directory: /tmp/loki/chunks
ring: rules_directory: /tmp/loki/rules
kvstore: replication_factor: 1
store: inmemory ring:
kvstore:
query_range: store: inmemory
results_cache: query_range:
cache: results_cache:
embedded_cache: cache:
enabled: true embedded_cache:
max_size_mb: 100 enabled: true
max_size_mb: 100
limits_config: limits_config:
metric_aggregation_enabled: true metric_aggregation_enabled: true
schema_config:
schema_config: configs:
configs: - from: '2020-10-24'
- from: 2020-10-24 store: tsdb
store: tsdb object_store: filesystem
object_store: filesystem schema: v13
schema: v13 index:
index: prefix: index_
prefix: index_ period: 24h
period: 24h pattern_ingester:
enabled: true
pattern_ingester: metric_aggregation:
enabled: true loki_address: localhost:3100
metric_aggregation: ruler:
loki_address: localhost:3100 alertmanager_url: http://localhost:9093
frontend:
ruler: encoding: protobuf
alertmanager_url: http://localhost:9093 analytics:
reporting_enabled: false
frontend:
encoding: protobuf
analytics:
reporting_enabled: false

View File

@ -1,5 +1,11 @@
--- ---
- name: Combine default and user settings, decrypt vault.
ansible.builtin.set_fact:
loki_settings: "{{ loki_default_settings |
ansible.builtin.combine(loki_settings, recursive=true) }}"
no_log: true
- name: Install Grafana Loki from mirror. - name: Install Grafana Loki from mirror.
ansible.builtin.apt: ansible.builtin.apt:
deb: "https://github.com/grafana/loki/releases\ deb: "https://github.com/grafana/loki/releases\

View File

@ -1,4 +1,4 @@
--- ---
# Managed with Ansible # Managed with Ansible
{{ loki_options | ansible.builtin.to_nice_yaml(indent=2, width=80) }} {{ loki_settings.config | ansible.builtin.to_nice_yaml(indent=2, width=80) }}