Ansible role to install and configure promtail.
Building and improving this Ansible role have been sponsored by my current and previous employers like Cloudpunks GmbH and Proact Deutschland GmbH.
- Requirements
- Default Variables
- promtail_client_configs
- promtail_cpu_shares
- promtail_default_folders
- promtail_default_labels
- promtail_default_publish
- promtail_default_volumes
- promtail_extra_folders
- promtail_extra_labels
- promtail_extra_publish
- promtail_extra_volumes
- promtail_image
- promtail_memory_limit
- promtail_memory_soft_limit
- promtail_memory_swap
- promtail_network
- promtail_number_of_cpus
- promtail_pull_image
- promtail_scrape_configs
- promtail_version
- Discovered Tags
- Dependencies
- License
- Author
- Minimum Ansible version:
2.10
List of client configs for Promtail
promtail_client_configs: []
promtail_client_configs:
- url: http://loki.example.com/promtail/api/v1/push
CPU shares with Docker deployment
promtail_cpu_shares:
promtail_cpu_shares: '512'
List of default folders to create
promtail_default_folders:
- /etc/promtail
List of default labels to assign to docker
promtail_default_labels: []
List of default port publishing for docker
promtail_default_publish: []
promtail_default_publish:
- 127.0.0.1:3100:3100
List of default volumes to mount for docker
promtail_default_volumes:
- /etc/promtail:/etc/promtail
List of extra folders to create
promtail_extra_folders: []
promtail_extra_folders:
- /path/to/host/folder1
- /path/to/host/folder2
- /path/to/host/folder3
List of extra labels to assign to docker
promtail_extra_labels: []
List of extra port publishing for docker
promtail_extra_publish: []
promtail_extra_publish:
- 127.0.0.1:3100:3100
List of extra volumes to mount for docker
promtail_extra_volumes: []
promtail_extra_volumes:
- /path/to/host/folder1:/path/within/container1
- /path/to/host/folder2:/path/within/container2
- /path/to/host/folder3:/path/within/container3
Docker image to use for deployment
promtail_image: grafana/promtail:{{ promtail_version }}
Memory limit with Docker deployment
promtail_memory_limit:
promtail_memory_limit: 1024m
Soft memory limit with Docker deployment
promtail_memory_soft_limit:
promtail_memory_soft_limit: 512m
Swap usage with Docker deployment
promtail_memory_swap:
promtail_memory_swap: 2048m
Optional docker network to attach
promtail_network:
Number of CPUs with Docker deployment
promtail_number_of_cpus:
promtail_number_of_cpus: '1.0'
Pull image as part of the tasks
promtail_pull_image: true
List of scrape configs for Promtail
promtail_scrape_configs: []
promtail_scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
Version of the release to install
promtail_version: 3.3.1
promtail
Apache-2.0