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 8b3c68e5e1
Add prometheus role for the prometheus/alertmanager server
Introduce a new monitoring server with prometheus and alertmanager for
monitoring all our boxes.
2020-08-31 21:09:54 +02:00

23 lines
857 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 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