Promtail is the log sending client for Grafana Loki. For traditional Linux systems, an RPM package is available from upstream, making installation fairly simple. Configuration is stored in a YAML file, so again, it's straightforward to configure via Ansible variables. Really, the only interesting step is adding the _promtail_ user, which is created by the RPM package, to the _systemd-journal_ group, so that Promtail can read the systemd journal files.
25 lines
441 B
YAML
25 lines
441 B
YAML
promtail_positions_file: /tmp/positions.yaml
|
|
|
|
promtail_clients:
|
|
- url: http://localhost:3100/loki/api/v1/push
|
|
|
|
promtail_scrape_configs:
|
|
- '{{ promtail_default_scrape.journal }}'
|
|
|
|
promtail_ca: ''
|
|
|
|
promtail_config:
|
|
server:
|
|
http_listen_port: 9080
|
|
grpc_listen_port: 0
|
|
|
|
positions:
|
|
filename: >-
|
|
{{ promtail_positions_file }}
|
|
|
|
clients: >-
|
|
{{ promtail_clients }}
|
|
|
|
scrape_configs: >-
|
|
{{ promtail_scrape_configs }}
|