ansible-infra/roles/monitoring/tasks/prometheus.yml

26 lines
815 B
YAML
Raw Normal View History

2020-04-13 14:46:45 +02:00
- name: Install Prometheus
2020-04-13 15:27:39 +02:00
include_role:
2020-04-13 14:46:45 +02:00
name: cloudalchemy.prometheus
public: yes
vars:
prometheus_config_file: "prometheus_custom.yml.j2"
prometheus_alert_rules: []
prometheus_web_external_url: "http://{{ prometheus_domain }}{{ prometheus_web_path }}"
prometheus_config_flags_extra:
web.route-prefix: /
prometheus_web_listen_address: "0.0.0.0:{{ prometheus_port }}"
- name: Configure Nginx for Prometheus
2020-04-13 15:27:39 +02:00
import_role:
2020-04-13 14:46:45 +02:00
name: nginx
vars:
nginx_config_file: "{{ inventory_hostname }}.d/prometheus.conf"
nginx_server:
locations:
- path: "{{ prometheus_web_path }}/"
basic_auth:
file: .htpasswd.prometheus
password: "{{ prometheus_password }}"
proxy_pass:
port: "{{ prometheus_port }}"
2020-04-13 15:27:39 +02:00
path: /