Skip to content

Commit

Permalink
Merge pull request #2 from weakcamel/add_extra_loki_config
Browse files Browse the repository at this point in the history
add query_range, query_scheduler and custom configs
  • Loading branch information
weakcamel authored Jun 11, 2022
2 parents 0e57631 + fd4fe47 commit b0883d5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a fork of a simple and extremely useful diogenxs.loki role.
Requirements
------------

- Ansible >= 2.9
- Ansible >= 3.0

Example Playbook
------------
Expand Down
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ loki_table_manager_config:
retention_deletes_enabled: false
retention_period: 0s
loki_ruler_config: {}
loki_query_scheduler: {}
loki_query_range: {}

# catch-all config option to be added "verbatim" to loki.yml
loki_custom_config: {}

promtail_client_config:
- url: "http://{{ loki_listen_address }}:{{ loki_listen_port }}/loki/api/v1/push"
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
description: Deploy and configure Loki and Promtail.
issue_tracker_url: https://github.com/weakcamel/ansible-role-loki/issues
license: WTFPL
min_ansible_version: "2.9"
min_ansible_version: "3.0"
platforms:
- name: Ubuntu
versions:
Expand Down
11 changes: 11 additions & 0 deletions templates/loki.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ runtime_config:
ruler:
{{ loki_ruler_config | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %}
{% if loki_query_scheduler %}
query_scheduler:
{{ loki_query_scheduler | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %}
{% if loki_query_range %}
query_range:
{{ loki_query_range | to_nice_yaml(indent=2) | indent(2, False) }}
{% endif %}
{% if loki_custom_config %}
{{ loki_custom_config | to_nice_yaml(indent=2) }}
{% endif %}

0 comments on commit b0883d5

Please sign in to comment.