Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
float
Commits
1f9144f7
Commit
1f9144f7
authored
Jan 18, 2021
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the possibility to specify external Prometheus targets for federation
parent
c6c121d0
Pipeline
#10964
failed with stage
in 16 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
roles/prometheus/templates/prometheus.yml.j2
roles/prometheus/templates/prometheus.yml.j2
+20
-0
No files found.
roles/prometheus/templates/prometheus.yml.j2
View file @
1f9144f7
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment