Initial commit with promtail playbook

master
Ariel Antigua 2020-07-26 13:40:47 -04:00
parent fed266cbfd
commit 4031a91907
1 changed files with 25 additions and 0 deletions

25
promtail/local.yaml Normal file
View File

@ -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