Files
2025-09-14 03:11:23 +03:00

67 lines
1.8 KiB
YAML

---
- name: Prometheus container
include_role:
name: service
vars:
docker_service: prometheus
docker_image: prom/prometheus
reverse_proxy_type: none
docker_command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention.time={{ prometheus_storage_retention }}"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
docker_mounts:
- name: data
path: /prometheus
- template: prometheus.yml
path: /etc/prometheus/prometheus.yml
- copypath: recording
path: /etc/prometheus/recording
- copypath: alerting
path: /etc/prometheus/alerting
- name: Alertmanager container for prometheus
include_role:
name: alertmanager
vars:
docker_networks:
- name: prometheus
when: prometheus_install_alertmanager
- name: Webhook container for prometheus
include_role:
name: service
vars:
docker_service: prometheus_webhook
docker_image: thecatlady/webhook
reverse_proxy_type: none
docker_mounts:
- template: webhooks.yaml
path: /config/hooks.yml
docker_networks:
- name: prometheus
when: prometheus_install_webhook
- name: Blackbox exporter for prometheus
include_role:
name: service
vars:
docker_service: blackbox_exporter
docker_image: prom/blackbox-exporter
reverse_proxy_type: none
docker_mounts:
- template: blackbox_exporter.yml
path: /etc/blackbox_exporter/config.yml
docker_networks:
- name: prometheus
- name: Grafana container for prometheus
include_role:
name: grafana
vars:
docker_networks:
- name: prometheus
when: prometheus_install_grafana