Send backup status via exporter to Prometheus

This commit is contained in:
phil 2023-12-02 09:18:19 +01:00
parent 2a6b2273a2
commit be1cf37ca3
6 changed files with 137 additions and 0 deletions

20
tasks/exporter.yml Normal file
View file

@ -0,0 +1,20 @@
---
- name: "Exporter | Copy borg_exporter"
ansible.builtin.template:
src: borg_exporter.j2
dest: /usr/local/bin/borg_exporter
mode: "0755"
- name: "Exporter | Copy systemd unit"
ansible.builtin.copy:
src: prometheus-borg-exporter.service
dest: /etc/systemd/system/prometheus-borg-exporter.service
mode: "0644"
notify: Restart exporter service
- name: "Exporter | Copy systemd timer"
ansible.builtin.copy:
src: prometheus-borg-exporter.timer
dest: /etc/systemd/system/prometheus-borg-exporter.timer
mode: "0644"
notify: Restart exporter timer