From 4031a919072bab8c15c33c144609beee53aaf42d Mon Sep 17 00:00:00 2001 From: Ariel Antigua Date: Sun, 26 Jul 2020 13:40:47 -0400 Subject: [PATCH] Initial commit with promtail playbook --- promtail/local.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 promtail/local.yaml diff --git a/promtail/local.yaml b/promtail/local.yaml new file mode 100644 index 0000000..d5195dc --- /dev/null +++ b/promtail/local.yaml @@ -0,0 +1,25 @@ +--- +- name: Install promtail to Linux machines for log collection. + hosts: all + roles: + - role: patrickjahns.promtail + vars: + promtail_config_server: + http_listen_port: 9080 + grpc_listen_port: 9081 + promtail_config_clients: + - url: "http://200.1.154.246:3100/loki/api/v1/push" + external_labels: + host: "{{ ansible_hostname }}" + promtail_config_positions: + filename: /tmp/positions.yaml + + promtail_config_scrape_configs: + - job_name: system + entry_parser: raw + static_configs: + - targets: + - localhost + labels: + job: varlogs + __path__: /var/log/*log