I've decided to use collectd_exporter, to bridge in data that node_exporter doesn't yet know about. My collectd_exporter's /metrics seem to be populated correctly, showing data like this:
"""
collectd_cpu{cpu="0",instance="boxoob",type="idle"} 781937
collectd_cpu{cpu="0",instance="boxoob",type="interrupt"} 0
collectd_cpu{cpu="0",instance="boxoob",type="nice"} 1726
"""
In prometheus, I've tried to use relabel_configs to move instance label to job. This doesn't seem to be working. With config like this:
"""
- job_name: 'collectd_exporter'
honor_labels: true
target_groups:
- targets:
- 'localhost:9103'
relabel_configs:
- source_labels: [instance]
regex: (.*)
target_label: job
replacement: bzz-$1
"""
I get data that looks like this:
"""
collectd_cpu{cpu="0",instance="boxoob",job="bzz-",type="user"}
"""
I've played with trying to specify different set of source_labels - no matter which labels I specify, the labels always seem to be empty (that is, ".*" matches on ""). Changing regexp to (.+) results in relabeling not triggering at all. Finally, using the same config with metric_relabel_configs (as suggested on irc) results in the same behaviour.
At this point I think I'm tickling some weird bug, or I have some basic problem (like a typo) somewhere else.
I'd be grateful for any suggestions.
KT.
Hello there,
I've decided to use collectd_exporter, to bridge in data that node_exporter doesn't yet know about. My collectd_exporter's /metrics seem to be populated correctly, showing data like this:
"""
collectd_cpu{cpu="0",instance="boxoob",type="idle"} 781937
collectd_cpu{cpu="0",instance="boxoob",type="interrupt"} 0
collectd_cpu{cpu="0",instance="boxoob",type="nice"} 1726
"""
In prometheus, I've tried to use relabel_configs to move instance label to job. This doesn't seem to be working. With config like this:
"""
- job_name: 'collectd_exporter'
honor_labels: true
target_groups:
- targets:
- 'localhost:9103'
relabel_configs:
- source_labels: [instance]
regex: (.*)
target_label: job
replacement: bzz-$1
"""
I get data that looks like this:
"""
collectd_cpu{cpu="0",instance="boxoob",job="bzz-",type="user"}
"""
I've played with trying to specify different set of source_labels - no matter which labels I specify, the labels always seem to be empty (that is, ".*" matches on ""). Changing regexp to (.+) results in relabeling not triggering at all. Finally, using the same config with metric_relabel_configs (as suggested on irc) results in the same behaviour.
At this point I think I'm tickling some weird bug, or I have some basic problem (like a typo) somewhere else.
I'd be grateful for any suggestions.
KT.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"""
- job_name: 'collectd_exporter'
honor_labels: true
target_groups:
- targets:
- 'localhost:9103'
relabel_configs:As you want to affect the returned metrics rather than just the target, use metric_relabel_configs here.
relabel_configs:As you want to affect the returned metrics rather than just the target, use metric_relabel_configs here.The behaviour is the same with metric_relabel_configs - that is, relabeling happens, but the regexp matches on empty string.