summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inventory/host_vars/ele-mon.yml13
-rw-r--r--roles/monitoring/prometheus/server/templates/prometheus.yml.j21
2 files changed, 14 insertions, 0 deletions
diff --git a/inventory/host_vars/ele-mon.yml b/inventory/host_vars/ele-mon.yml
index a8840ef2..9fe9558c 100644
--- a/inventory/host_vars/ele-mon.yml
+++ b/inventory/host_vars/ele-mon.yml
@@ -72,3 +72,16 @@ prometheus_alertmanager_web_route_prefix: /alertmanager/
grafana_secret_key: "{{ vault_grafana_secret_key }}"
+
+
+prometheus_server_jobs_extra: |
+ - job_name: 'node-openwrt'
+ scheme: http
+ static_configs:
+ - targets:
+ - 192.168.42.170:9100
+ - 192.168.42.171:9100
+ - 192.168.42.172:9100
+ - 192.168.42.173:9100
+ - 192.168.42.174:9100
+ - 192.168.42.175:9100
diff --git a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
index 6845a2d2..6db34920 100644
--- a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
@@ -52,5 +52,6 @@ scrape_configs:
- "/etc/prometheus/jobs/{{ job }}/*.yml"
{% endfor %}
{% if prometheus_server_jobs_extra is defined %}
+
{{ prometheus_server_jobs_extra | indent(2) }}
{% endif %}