From 2c643ea5fbd02b50411bcba1f5df14a8c327fdb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Mon, 13 Dec 2021 17:11:14 +0000 Subject: roles: Add loki and promtail configurations --- roles/loki/templates/promtail.yml.j2 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 roles/loki/templates/promtail.yml.j2 (limited to 'roles/loki/templates/promtail.yml.j2') diff --git a/roles/loki/templates/promtail.yml.j2 b/roles/loki/templates/promtail.yml.j2 new file mode 100644 index 0000000..16c580e --- /dev/null +++ b/roles/loki/templates/promtail.yml.j2 @@ -0,0 +1,23 @@ +server: + http_listen_port: 9080 + grpc_listen_port: 0 + +positions: + filename: /var/promtail/positions.yaml + +clients: + - url: http://localhost:3100/loki/api/v1/push + +scrape_configs: + - job_name: system + static_configs: + - targets: + - localhost + labels: + job: var_logs + __path__: /var/log/*log + - targets: + - localhost + labels: + job: www_logs + __path__: /var/www/logs/*log -- cgit v1.2.3