EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit f550d05c authored by Nicolas Baudoin's avatar Nicolas Baudoin
Browse files

Changed/fixed the Prometheus config for DNS SRV management with the BB exp

parent 8ed57342
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ scrape_configs:
dns_sd_configs:
- names:
- 'pct.{{datacenter_url}}'
type: 'SRV'
type: 'SRV'
### The VM
- job_name: qm
......@@ -182,7 +182,7 @@ scrape_configs:
type: 'SRV'
### customhaproxy
- job_name: customhaproxy.dc1.eox.at
- job_name: customhaproxy.{{datacenter_url}}.eox.at
metrics_path: /haproxy_custom_metrics
scheme: https
tls_config:
......@@ -191,7 +191,7 @@ scrape_configs:
key_file: '/etc/ssl/prometheus_client/{{fqdn}}.key'
dns_sd_configs:
- names:
- 'haproxy_custom.dc1.eox.at'
- 'haproxy_custom.{{datacenter_url}}'
type: 'SRV'
### patroni
......@@ -237,7 +237,7 @@ scrape_configs:
### New DNS SRV entries for the Blackbox exporter
{% for exporter in blackbox_exporters %}
{% for exporter in blackbox_exporters %}
- job_name: {{exporter}}_blackbox_icmp
scheme: https
tls_config:
......@@ -249,8 +249,18 @@ scrape_configs:
module: [icmp]
dns_sd_configs:
- names:
- 'blackbox.icmp.{{ datacenter_url }}'
- '_https._tcp.blackbox.icmp.{{ datacenter_url }}'
type: 'SRV'
relabel_configs:
# For ICMP, we just need the hostname (no scheme).
- source_labels: [__address__]
regex: '(.+):443'
target_label: __param_target
replacement: '${1}' # Just the hostname
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 'meru.eox.at:9100'
- job_name: {{exporter}}_blackbox_http2xx
scheme: https
......@@ -263,8 +273,18 @@ scrape_configs:
module: [http_2xx]
dns_sd_configs:
- names:
- 'blackbox.http2xx.{{ datacenter_url }}'
- '_https._tcp.blackbox.http2xx.{{ datacenter_url }}'
type: 'SRV'
relabel_configs:
# For HTTP 2xx, we need a full URL (https://...)
- source_labels: [__address__]
regex: '(.+):443'
target_label: __param_target
replacement: 'https://${1}'
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 'meru.eox.at:9100'
- job_name: {{exporter}}_blackbox_tls
scheme: https
......@@ -277,8 +297,18 @@ scrape_configs:
module: [tcp]
dns_sd_configs:
- names:
- 'blackbox.tls.{{ datacenter_url }}'
- '_https._tcp.blackbox.tls.{{ datacenter_url }}'
type: 'SRV'
relabel_configs:
# For TLS (tcp) checks, we can keep host:port
- source_labels: [__address__]
regex: '(.+):443'
target_label: __param_target
replacement: '${1}:443'
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 'meru.eox.at:9100'
- job_name: {{exporter}}_blackbox_http_no_tls
scheme: https
......@@ -291,13 +321,23 @@ scrape_configs:
module: [http_no_tls]
dns_sd_configs:
- names:
- 'blackbox.httpnotls.{{ datacenter_url }}'
- '_https._tcp.blackbox.httpnotls.{{ datacenter_url }}'
type: 'SRV'
relabel_configs:
# For http_no_tls, use http:// scheme
- source_labels: [__address__]
regex: '(.+):443'
target_label: __param_target
replacement: 'http://${1}'
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 'meru.eox.at:9100'
# Still keeping these below as file-based
{% if blackbox_monitoring.http_custom is defined %}
{% for custom in blackbox_monitoring.http_custom %}
{% for custom in blackbox_monitoring.http_custom %}
- job_name: {{exporter}}_{{ custom.name }}_http_custom
scheme: https
tls_config:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment