2024-01-17 17:45:49 +00:00
|
|
|
server:
|
|
|
|
log_level: warn
|
2024-02-18 02:26:24 +00:00
|
|
|
http_listen_port: 9080
|
2024-01-17 17:45:49 +00:00
|
|
|
grpc_listen_port: 0
|
|
|
|
|
|
|
|
clients:
|
2024-02-04 00:16:30 +00:00
|
|
|
- url: http://monitoring-0:3100/loki/api/v1/push
|
2024-01-17 17:45:49 +00:00
|
|
|
external_labels:
|
|
|
|
hostname: "{{ inventory_hostname }}"
|
|
|
|
|
|
|
|
scrape_configs:
|
|
|
|
- job_name: journald
|
|
|
|
journal:
|
|
|
|
labels:
|
|
|
|
job: systemd-label
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: ['__journal__systemd_unit']
|
|
|
|
target_label: 'unit'
|
2024-02-04 00:16:30 +00:00
|
|
|
{% if logs is defined and 'jobs' in logs %}
|
2024-01-17 17:45:49 +00:00
|
|
|
{% for job_name, path in logs.jobs.items() %}
|
|
|
|
- job_name: {{ job_name }}
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost
|
|
|
|
labels:
|
|
|
|
job: {{ job_name }}
|
|
|
|
__path__: {{ path }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|