ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit cedc6682b37520b6ed0d43c410ade7b38bff4e38
parent 8aa22f57546ea576df86f57dd428dbf29c6fe474
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Fri, 20 Mar 2020 02:06:55 +0200

prometheus: Add support for apcupsd exporter

Diffstat:
ansible/inventory/host_vars/productiongrafana/prometheus.yml | 3++-
ansible/roles/prometheus/templates/prometheus.yml.j2 | 7+++++++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ansible/inventory/host_vars/productiongrafana/prometheus.yml b/ansible/inventory/host_vars/productiongrafana/prometheus.yml @@ -2,10 +2,11 @@ prometheus__node_targets: ['127.0.0.1', 'matrix.int.erethon.com', 'pgmatrix.int.erethon.com', 'oricono.int.erethon.com', - 'spinny.int.erethon.com'] + 'spinny.int.erethon.com', 'kagari.int.erethon.com'] prometheus__http_targets: ['https://erethon.com', 'https://blog.erethon.com', 'https://grafana.erethon.com', 'https://riot.dgrig.com', 'https://matrix.erethon.com', 'https://plothopes.com', 'https://f.erethon.com'] prometheus__postgres_targets: ['pgmatrix.int.erethon.com'] prometheus__synapse_target: 'matrix.int.erethon.com' +prometheus__apcupsd_target: 'thor.int.erethon.com' diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -48,3 +48,9 @@ scrape_configs: static_configs: - targets: ['{{ prometheus__synapse_target }}:9666'] {% endif %} + +{% if prometheus__apcupsd_target is defined %} + - job_name: 'apcupsd' + static_configs: + - targets: ['{{ prometheus__apcupsd_target }}:9162'] +{% endif %}+ \ No newline at end of file