1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/prometheus/tasks/main.yml
Jelle van der Waa bd19c00775
Add configuration to retain prometheus data for 1 year
Start monitoring prometheus to keep check of the database growth rate
and retain data for a longer preriod in prometheus.
2020-10-06 22:28:30 +02:00

27 lines
1018 B
YAML

---
- name: install prometheus,alertmanager server
pacman: name=prometheus,alertmanager state=present
- name: install prometheus configuration
template: src=prometheus.yml.j2 dest=/etc/prometheus/prometheus.yml owner=root group=root mode=644
notify: reload prometheus
- name: install prometheus cli configuration
copy: src=prometheus.conf dest=/etc/conf.d/prometheus owner=root group=root mode=600
notify: reload prometheus
- name: install prometheus alert configuration
copy: src=node.rules.yml dest=/etc/prometheus/node.rules.yml owner=root group=root mode=644
notify: reload prometheus
- name: install alertmanager configuration
template: src=alertmanager.yml.j2 dest=/etc/alertmanager/alertmanager.yml owner=root group=root mode=644
notify: reload alertmanager
- name: enable prometheus server service
systemd: name=prometheus enabled=yes daemon_reload=yes state=started
- name: enable alertmanager server service
systemd: name=alertmanager enabled=yes daemon_reload=yes state=started