kpetremann / salt-exporter

Salt Prometheus exporter working out of the box without any configuration on Salt side. Comes with an event watcher TUI.
https://kpetremann.github.io/salt-exporter/
MIT License
30 stars 8 forks source link

RFE: Allow filtering out minion-specific metrics via a cmdline option #20

Closed rjel2159 closed 1 year ago

rjel2159 commented 1 year ago

Can you please add a cmdline option that filters out/disables all minion-specific metrics? This is needed to avoid having high-cardinality labels in Prometheus with masters that have a large number (1k+) of minions connecting to them. Setting the '-health-minions' option to false doesn't work as I still see the following metrics:


    salt_responses_total(minion="XXXX", success=true) = <count>
kpetremann commented 1 year ago

Hello @rjel2159,

Thanks for submitting the issue.

-health-minions was introduced recently and only concerns salt_function_status metric.

I'll look into your request, I just wonder what would be the best approach: to create an a new flag, or make health-minions manage the salt_responses_total as well.

rjel2159 commented 1 year ago

Thanks for your quick response. I think setting health-minions option to false should exclude all minion-specific metrics, including salt_function_status() as well as salt_responses_total().

kpetremann commented 1 year ago

@rjel2159 done in v0.5.0