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