Closed rjel2159 closed 1 year ago
Hello @rjel2159,
salt_function_status
is a gauge, not a counter.
1 = ok
0 = not ok
See the help of the metric:
$ curl -s http://localhost:2112/metrics | grep salt_function_status
# HELP salt_function_status Last function/state success, 0=Failed, 1=Success
see PR #7 for details
Hello @rjel2159,
salt_function_status
is a gauge, not a counter. 1 = ok 0 = not okSee the help of the metric:
$ curl -s http://localhost:2112/metrics | grep salt_function_status # HELP salt_function_status Last function/state success, 0=Failed, 1=Success
I see, thanks for your response. It'd then be useful to have a metric such as salt_function_responses(minion=
The cardinality would explode.
Why do you need that?
Mainly for testing to corelate salt_function_responses_total()'s functions/states counters to individual minions - meant to be used within small environments (i.e. DEV/QA) only. I totally agree with the concern of having a high cardinality which is why I had previously opened https://github.com/kpetremann/salt-exporter/issues/20 to allow disabling all minion-specific metrics.
:+1: If your need was only to troubleshoot an issue, I would have suggested either to use the salt-live tool in this repo, or to use dedicated returner to sent some metrics to a Prometheus Gateway.
Let me think about what would be the best approach. I would like to avoid current user to be impacted by such changes.
Something like a "verbose-metric" flag or something like this, which would either:
salt_function_responses_total
metricI also need to think about the other current/future metrics. Users might expect to have the same option for these. So I might need to rethink the configuration to better scale the different options, while keeping this exporter simple to use and maintain.
Thanks for looking into this request. If you could implement (perhaps optionally) adding the minion label to the salt_function_responses_total() metric, that would be great.
Hi @rjel2159,
FYI the work is mostly done, I need to add more tests and update the documentation, as I completely refacto the configuration of the exporter.
You can already test it using the configurable_metrics branch.
You will need a configuration file called config.yml
containing at least:
metrics:
salt_function_responses_total:
enabled: true
add-minion-label: true
salt_scheduled_job_return_total:
enabled: true
add-minion-label: true
Awesome, thanks so much for the update!
On Thursday, June 29, 2023 at 12:25:05 PM EDT, Kevin Petremann ***@***.***> wrote:
Hi @rjel2159,
FYI the work is mostly done, I need to add more tests and update the documentation, as I completely refacto the configuration of the exporter.
You can already test it using the configurable_metrics branch.
You will need a configuration file called config.yml containing at least: metrics: salt_function_responses_total: enabled: true add-minion-label: true salt_scheduled_job_return_total: enabled: true add-minion-label: true — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
The pre-release is available for testing: https://github.com/kpetremann/salt-exporter/releases/tag/v0.7.0-pre.1
The README has been updated.
The feature is now available in the v0.7.0 which has just been released.
@rjel2159 feel free to reopen this issue, or another one, if you encounter any problem.
Great, thank you so much. I'll test this new feature shortly.
On Thursday, July 6, 2023 at 12:26:05 PM EDT, Kevin Petremann ***@***.***> wrote:
The feature is now available in the v0.7.0 which has just been released.
@rjel2159 feel free to reopen this issue, or another one, if you encounter any problem.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
The salt_function_status() counter doesn't increment but always stays 1 - here's an example when running total of 7 states on a single minion: