salt-extensions / saltext-prometheus

Salt Extension Modules for Prometheus
https://saltext-prometheus.readthedocs.io/en/latest/
Apache License 2.0
10 stars 6 forks source link

[BUG] salt_aborted metric lacks a state label #26

Closed nicholasmhughes closed 9 months ago

nicholasmhughes commented 9 months ago

Description The salt_aborted metric needs to have a state label applied to prevent conflicts when multiple files are generated for the prometheus textfile collector.

$ grep ^salt_aborted /var/lib/node_exporter/textfile_collector/salt-*
/var/lib/node_exporter/textfile_collector/salt-stateone.prom
5:salt_aborted 0.0

/var/lib/node_exporter/textfile_collector/salt-statetwo.prom
5:salt_aborted 0.0

/var/lib/node_exporter/textfile_collector/salt-highstate.prom
5:salt_aborted 0.0

that's considered a duplicate and the textfile collector complains, whereas all the other metrics are of the form salt_states_succeeded{state="highstate"} 2.0 for comparison

Expected behavior generated files should not create errors due to conflicts of metrics