ansible-collection-prometheus/roles/prometheus/molecule/alternative/molecule.yml
Christian Krause 762cb1d5f3
enhancement(prometheus): supports multiple web listen addresses in preflight
this is for consistency with the other roles' preflight asserts for when
prometheus itself finally supports multiple web listen addresses

Signed-off-by: Christian Krause <christian.krause@idiv.de>
2023-11-30 11:12:11 +01:00

90 lines
3.1 KiB
YAML

---
provisioner:
inventory:
group_vars:
all:
prometheus_binary_local_dir: '/tmp/prometheus-linux-amd64'
prometheus_config_dir: /opt/prom/etc
prometheus_db_dir: /opt/prom/lib
prometheus_web_listen_address: "127.0.0.1:9090"
prometheus_web_external_url: "http://127.0.0.1:9090/prometheus"
prometheus_read_only_dirs:
- /etc
prometheus_storage_retention: "60d"
prometheus_storage_retention_size: "1GB"
prometheus_config_flags_extra:
alertmanager.timeout: 10s
web.enable-admin-api:
enable-feature:
- promql-at-modifier
- remote-write-receiver
prometheus_alertmanager_config:
- scheme: https
path_prefix: /alertmanager
basic_auth:
username: user
password: pass
static_configs:
- targets: ["127.0.0.1:9090"]
proxy_url: "127.0.0.2"
prometheus_alert_relabel_configs:
- action: labeldrop
regex: replica
prometheus_global:
scrape_interval: 3s
scrape_timeout: 2s
evaluation_interval: 10s
prometheus_remote_write:
- url: http://influx.example.org:8086/api/v1/prom/write?db=test
basic_auth:
username: prometheus
password: SuperSecret
prometheus_remote_read:
- url: http://influx.example.org:8086/api/v1/prom/read?db=demo
prometheus_external_labels:
environment: "alternative"
prometheus_targets:
node:
- targets:
- node.demo.do.prometheus.io
- influx.example.org:9100
labels:
env: demo
docker:
- targets:
- demo.do.prometheus.io:8080
- influx.example.org:8080
labels:
env: demo
prometheus_scrape_configs:
- job_name: "prometheus"
metrics_path: "{{ prometheus_metrics_path }}"
static_configs:
- targets:
- "{{ ansible_fqdn | default(ansible_host) | default('localhost')\
\ }}:9090"
- job_name: "node"
file_sd_configs:
- files:
- "{{ prometheus_config_dir }}/file_sd/node.yml"
- job_name: "docker"
file_sd_configs:
- files:
- "{{ prometheus_config_dir }}/file_sd/docker.yml"
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- http://node.demo.do.prometheus.io
- http://influx.example.org:9100
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115 # Blackbox exporter.
prometheus_version: 2.25.2
prometheus_stop_timeout: 1min