Commit 1f9144f7 authored by ale's avatar ale

Add the possibility to specify external Prometheus targets for federation

parent c6c121d0
Pipeline #10964 failed with stage
in 16 minutes and 39 seconds
......@@ -270,6 +270,26 @@ scrape_configs:
replacement: "${1}"
{% endfor %}
{# Federated external targets #}
{% if prometheus_federated_targets|default([]) %}
- job_name: "prometheus-federation"
honor_labels: true
metrics_path: "/federate"
params:
"match[]":
- '{__name__=~".+"}'
metric_relabel_configs:
# Drop replica label 'monitor' to get unique metrics
- action: labeldrop
regex: monitor
# Drop high cardinality metrics
- source_labels: ['__name__']
regex: "node_systemd_unit_state"
action: drop
static_configs:
- targets: {{ prometheus_federated_targets | to_json }}
{% endif %}
rule_files:
- /etc/prometheus/rules/*.yml
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment