I have prometheus with blackbox exporter and I want add in my job different endpoint etc.
/q/health/live
/health/live
How add multiple endpoint in __tmp_health_url
- job_name: health-check
metrics_path: /probe
scheme: http
params:
module: [http_2xx] # Look for a HTTP 200 response.
kubernetes_sd_configs:
- role: service
relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_healthcheck]
regex: true
action: keep
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace
- source_labels: [__tmp_health_url]
replacement: 'health'
target_label: __tmp_health_url
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_healthcheckurl]
regex: (.+)
target_label: __tmp_health_url
- source_labels: [__address__,__tmp_health_url]
separator: '/'
target_label: __param_target
- target_label: __address__
replacement: grafana-prometheus-blackbox-exporter:9115
- source_labels: [__param_target]
target_label: instance
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- source_labels: [__meta_kubernetes_service_name]
target_label: service