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

Add duration metric increased by events that include a value for `return.[].duration` #71

Open ezekiel opened 3 weeks ago

ezekiel commented 3 weeks ago

Does this seem possible? I imagine the potential granularity might not provide the best observability - but even a simple counter that is increased per-function or per-execution module would be helpful in identifying slowdowns.

kpetremann commented 3 weeks ago

Hi @ezekiel ,

Last time I checked it did not seem the duration field was always set nor consistent. I'll double check if it is, and if it is doable.

If ok, it could be a gauge, the value being the duration, per module/function and optionally per minions (optional to avoid cardinality issues when users have a lot of minions).

I'll keep you posted as soon as I have enough free time to have a look.