ansible-debops-infrastructure

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

commit f2cf0f5d5daebb1f359ab8250ada683dbded4aa2
parent 55617ae07f3299b17726342b1398a73f56e1190a
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Sun, 22 Mar 2020 04:05:00 +0200

prometheus: Add support for custom DHT22 exporter

Diffstat:
ansible/inventory/host_vars/productiongrafana/prometheus.yml | 4+++-
ansible/roles/prometheus/templates/prometheus.yml.j2 | 10++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ansible/inventory/host_vars/productiongrafana/prometheus.yml b/ansible/inventory/host_vars/productiongrafana/prometheus.yml @@ -2,7 +2,8 @@ prometheus__node_targets: ['127.0.0.1', 'matrix.int.erethon.com', 'pgmatrix.int.erethon.com', 'oricono.int.erethon.com', - 'spinny.int.erethon.com', 'kagari.int.erethon.com'] + 'spinny.int.erethon.com', 'kagari.int.erethon.com', 'rpi.int.erethon.com', + 'lenny.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', @@ -10,3 +11,4 @@ prometheus__http_targets: ['https://erethon.com', prometheus__postgres_targets: ['pgmatrix.int.erethon.com'] prometheus__synapse_target: 'matrix.int.erethon.com' prometheus__apcupsd_target: 'thor.int.erethon.com' +prometheus__dht_target: 'rpi.int.erethon.com' diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -53,4 +53,11 @@ scrape_configs: - job_name: 'apcupsd' static_configs: - targets: ['{{ prometheus__apcupsd_target }}:9162'] -{% endif %}- \ No newline at end of file +{% endif %} + +{% if prometheus__dht_target is defined %} + - job_name: 'dht_environment' + metrics_path: '/' + static_configs: + - targets: ['{{ prometheus__dht_target }}:9222'] +{% endif %}