diff --git a/monitoring/templates/promtail.yml.tpl b/monitoring/templates/promtail.yml.tpl index e59bd92..c92103e 100644 --- a/monitoring/templates/promtail.yml.tpl +++ b/monitoring/templates/promtail.yml.tpl @@ -10,29 +10,33 @@ clients: - url: http://localhost:9999/loki/loki/api/v1/push scrape_configs: -- job_name: consul - static_configs: - - targets: - - localhost - labels: - job: consul - __path__: /home/consul/*.log -- job_name: nomad - static_configs: - - targets: - - localhost - labels: - job: nomad - __path__: /var/log/nomad*.log -- job_name: journal - journal: - max_age: 12h - path: /var/log/journal - matches: _TRANSPORT - labels: - job: systemd-journal - relabel_configs: - - source_labels: ['__journal__systemd_unit'] - target_label: 'unit' - - source_labels: ['__journal_syslog_identifier'] - target_label: 'syslog_identifier' + - job_name: consul + static_configs: + - targets: + - localhost + labels: + job: consul + __path__: /home/consul/*.log + - job_name: nomad + static_configs: + - targets: + - localhost + labels: + job: nomad + __path__: /var/log/nomad*.log + - job_name: journal + journal: + json: false + max_age: 12h + path: /var/log/journal + matches: _TRANSPORT=kernel + labels: + job: systemd-journal + relabel_configs: + - source_labels: ['__journal__systemd_unit'] + target_label: 'unit' + - source_labels: ['__journal_syslog_identifier'] + target_label: 'syslog_identifier' + - source_labels: + - __journal__hostname + target_label: nodename