systemd_exporter icon indicating copy to clipboard operation
systemd_exporter copied to clipboard

use case: service_restart_total only

Open belm0 opened this issue 5 years ago • 3 comments

I'm currently using node_exporter and have this issue, so raising it here as well.

Metrics like unit_state are quite costly due to cardinality. In my case with node_exporter it's consuming about ~15% of our entire metric space, affecting scrape times, caching nodes, etc.

My use case requires service_restart_total only, so ideally I'd have a way to disable unit_state and various other default metrics.

belm0 avatar Jul 21 '20 07:07 belm0

:+1: I think we should add a disable/enable flag for it, like we have it in https://github.com/povilasv/systemd_exporter/blob/master/systemd/systemd.go#L32

povilasv avatar Jul 23 '20 08:07 povilasv

@povilasv In the metric table of the README, it would be helpful to have a column indicating which enable flag, if any, controls the metric.

Are you proposing an enable flag for unit_state only? It might be OK for my use case, depending on how many metrics remain by default.

belm0 avatar Jul 23 '20 11:07 belm0

I think more like disable flag for unit_state and then let's see if there is another chatty metric, we need a disable flag for ;)

povilasv avatar Jul 24 '20 08:07 povilasv