Skip to content

Add --compat-disk-labels option#256

Open
deajan wants to merge 2 commits intoprometheus-community:masterfrom
deajan:smartmon-py-compat-v2
Open

Add --compat-disk-labels option#256
deajan wants to merge 2 commits intoprometheus-community:masterfrom
deajan:smartmon-py-compat-v2

Conversation

@deajan
Copy link
Contributor

@deajan deajan commented Sep 23, 2025

There is a difference in metrics between smartmon.sh and smartmon.py:

smartmon_device_info{disk="/dev/sda" [...]}

became

smartmon_device_info{device="/dev/sda", disk="0" [...]}

So basically the metric name changed, and the labels changed too which makes parsing / relabeling a pain.
So my proposition is to add --compat-disk-labels to smartmon.py in order for the latter to generate metrics with the same disk name as previously found in smarmon.sh.

The --compat-disk-labels parameter has to be applied explicitly, so no behavior changes for existing setups.

Signed-off-by: Orsiris de Jong <ozy@netpower.fr>
Signed-off-by: Orsiris de Jong <ozy@netpower.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant