Files
gitlab-mirror/roles/promtail/templates/promtail.yml.j2
2025-12-17 17:58:14 +03:00

29 lines
626 B
Django/Jinja

{% if custom_server_config is defined %}
{{ custom_server_config }}
{% else %}
server:
http_listen_port: {{ promtail_http_port }}
grpc_listen_port: 0
{% endif %}
positions:
filename: {{ promtail_positions_path }}
clients:
- url: "http://{{ loki_server }}:{{ loki_port }}/loki/api/v1/push"
scrape_configs:
{% if add_var_logs %}
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
host: {{ ansible_hostname }}
{% endif %}
{% if custom_scrape_configs is defined %}
{{ custom_scrape_configs }}
{% endif %}