Commit a37f16a1 authored by ale's avatar ale

Drop node-exporter systemd metrics for units we do not care about

Some of these systemd metrics have large cardinalities, so it's good
to prune them at collection time.

Part of optimization work for issue #51.
parent d4ad6056
Pipeline #3384 passed with stage
in 5 minutes and 9 seconds
{# Common relabel config snippet #}
{% macro relabel_configs(service=None) %}
relabel_configs:
- source_labels: [__address__]
regex: "([^.]*).*:[0-9]+"
target_label: host
replacement: "${1}"
{% endmacro %}
{# Generate static targets for hosts in an Ansible group #}
{% macro targets_for_group(group, port) %}
- targets:
......@@ -80,12 +71,18 @@ alerting:
{{ targets_for_service('prometheus', 'prometheus', 9093) }}
scrape_configs:
{{ job_static_config('node', 'all', 9100) }}
{{ job_static_config('cgroups-exporter', 'all', 3909) }}
{{ job_static_config('mtail', 'all', 3903) }}
{{ job_static_config('docker', 'all', 9323) }}
{{ job_static_config('backup-agent', 'all', 5331) }}
{# The configuration for the node exporter drops some metrics with large cardinality. #}
{{ job_static_config('node', 'all', 9100) }}
metric_relabel_configs:
- source_labels: [name]
regex: ".*\\.(path|scope|slice|socket|target|timer)"
action: drop
{# Iterate over monitoring endpoints of all services. #}
{% for service_name, service in services.items()|sort %}
......
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