prometheus.prometheus.prometheus role – Installs and configures prometheus
Note
This role is part of the prometheus.prometheus collection (version 0.22.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it use: ansible-galaxy collection install prometheus.prometheus
.
To use it in a playbook, specify: prometheus.prometheus.prometheus
.
Entry point main
– Installs and configures prometheus
Synopsis
Prometheus monitoring system configuration and management
Parameters
Parameter |
Comments |
---|---|
The Agent mode optimizes Prometheus for the remote write use case. It disables querying, alerting, and local storage, and replaces it with a customized TSDB WAL. Everything else stays the same. This feature is available starting from Prometheus v2.32.0. Choices:
|
|
Alert relabeling rules. This should be specified as list in yaml format. It is compatible with the official alert_relabel_configs |
|
Full list of alerting rules which will be copied to Alerting rules can be also provided by other files located in Please see default values in role defaults/main.yml |
|
List of folders where ansible will look for files containing alerting rules which will be copied to Files must have a Default: |
|
Configuration responsible for pointing where alertmanagers are. This should be specified as list in yaml format. It is compatible with the official alertmanager_config |
|
Advanced Directory to install binaries Default: |
|
URL of the prometheus binaries .tar.gz file Default: |
|
URL of the prometheus checksums file Default: |
|
Path to directory with prometheus configuration Default: |
|
Variable used to provide custom prometheus configuration file in form of ansible template Default: |
|
Additional configuration flags passed to prometheus binary at startup Example: prometheus_config_flags_extra: { alertmanager.timeout: 10s } |
|
Path to directory with prometheus database Default: |
|
Provide map of additional labels which will be added to any time series or alerts when communicating with external systems Default: |
|
Prometheus global config. It is compatible with the official configuration Default: |
|
Local path to stash the archive and its extraction Default: |
|
Prometheus external metrics path Default: |
|
Should the provisioning of alert rule files be kept synced. If true, previous provisioned files will be removed if not referenced anymore. Choices:
|
|
Additional paths that Prometheus is allowed to read (useful for SSL certs outside of the config directory) |
|
Remote read. It is compatible with the official configuration |
|
Remote write. Compatible with the official configuration |
|
List of folders where ansible will look for files containing custom scrape config configuration files which will be copied to This feature is available starting from Prometheus v2.43.0. Default: |
|
Prometheus scrape jobs provided in same format as in the official docs Default: |
|
List of folders where ansible will look for files containing custom static target configuration files which will be copied to Default: |
|
How long to wait for Prometheus to shutdown. This is passed as a systemd TimeoutStopSec time spec. Default: |
|
Data retention period Default: |
|
Data retention period by size Maximum number of bytes that can be stored for blocks. Units supported: KB, MB, GB, TB, PB. Default: |
|
System group for Prometheus. Default: |
|
System user for Prometheus. Default: |
|
Targets which will be scraped. |
|
Prometheus package version. Also accepts Only prometheus 2.x is supported Default: |
|
A Prometheus web config yaml for configuring TLS and auth. |
|
External address on which prometheus is available. Useful when behind reverse proxy. Ex. `http://example.org/prometheus` |
|
Address on which prometheus will be listening Default: |