add support for Loki ruler configuration

update also broken Loki documentation link
This commit is contained in:
Waldek Maleska 2021-02-24 15:35:40 +00:00
parent f74de4a831
commit 765a12dadd
No known key found for this signature in database
GPG Key ID: 8667A0662654167A
2 changed files with 7 additions and 3 deletions

View File

@ -75,7 +75,7 @@ loki_runtime_config: []
loki_table_manager_config: loki_table_manager_config:
retention_deletes_enabled: false retention_deletes_enabled: false
retention_period: 0s retention_period: 0s
loki_ruler_config: {}
promtail_client_config: promtail_client_config:
- url: "http://{{ loki_listen_address }}:{{ loki_listen_port }}/loki/api/v1/push" - url: "http://{{ loki_listen_address }}:{{ loki_listen_port }}/loki/api/v1/push"
@ -100,4 +100,4 @@ promtail_scrape_config:
promtail_target_config: [] promtail_target_config: []
promtail_positions_config: promtail_positions_config:
filename: /tmp/positions.yaml filename: /tmp/positions.yaml

View File

@ -1,6 +1,6 @@
#jinja2: trim_blocks: True, lstrip_blocks: True #jinja2: trim_blocks: True, lstrip_blocks: True
{{ ansible_managed | comment }} {{ ansible_managed | comment }}
# https://github.com/grafana/loki/blob/master/docs/configuration/README.md#configuration-file-reference # https://grafana.com/docs/loki/latest/configuration/
{% if loki_target != "" %} {% if loki_target != "" %}
target: {{ loki_target }} target: {{ loki_target }}
@ -57,3 +57,7 @@ table_manager:
runtime_config: runtime_config:
{{ loki_runtime_config | to_nice_yaml(indent=2) | indent(2, False) }} {{ loki_runtime_config | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %} {% endif %}
{% if loki_ruler_config %}
ruler:
{{ loki_ruler_config | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %}