summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/register/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/prometheus/exporter/register/templates')
-rw-r--r--roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j23
-rw-r--r--roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j27
2 files changed, 10 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2
index 3ecf129a..5f98e3a8 100644
--- a/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2
+++ b/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2
@@ -3,6 +3,9 @@
instance: '{{ target.instance }}'
__param_target: '{{ target.config.target }}'
__param_module: '{{ target.config.module }}'
+{% if 'hostname' in target.config %}
+ __param_hostname: '{{ target.config.hostname }}'
+{% endif %}
{% for name, value in prometheus_target_labels.items() %}
{{ name }}: '{{ value }}'
{% endfor %}
diff --git a/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2
new file mode 100644
index 00000000..74ada64e
--- /dev/null
+++ b/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2
@@ -0,0 +1,7 @@
+- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ]
+ labels:
+ instance: '{{ target.instance }}'
+ __metrics_path__: '/whawty-nginx-sso/{{ target.config.instance_name }}'
+{% for name, value in prometheus_target_labels.items() %}
+ {{ name }}: '{{ value }}'
+{% endfor %}