Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for device types and predictable device paths (rebased) #257

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

k0ste
Copy link
Contributor

@k0ste k0ste commented Dec 18, 2024

Seems author in #235 downshifted to inactive. Rebased all this patches, fixed merge conflicts

We will now log a warning if smartctl path passed via command line is invalid.

Signed-off-by: Piotr Dobrowolski <[email protected]>
(cherry picked from commit 1c9c694)
This adds a new command line option allowing for customization of
autodetected device types and enables use of special "by-id" device type
that forces use of predictable device paths (/dev/disk/by-id/...)

Relevant change to device name parsing regular expression is included
now, so predictable device paths are now also usable when directly
specified.

Signed-off-by: Piotr Dobrowolski <[email protected]>
(cherry picked from commit 4c5f721)

Conflicts:
  - file: 'readjson.go'
    comment: 'manually resolve new logger issues'
Signed-off-by: Piotr Dobrowolski <[email protected]>
(cherry picked from commit 319184c)

Conflicts:
  - file: 'main.go'
    comment: 'manually resolve new logger issues'
  - file: 'readjson.go'
    comment: 'manually resolve new logger issues'
@k0ste
Copy link
Contributor Author

k0ste commented Dec 18, 2024

Compared diff with 0.12.0. No actual diff in produced metrics (as expected for upgrades), only for fixes

Screenshot 2024-12-18 at 11 47 42

@SuperQ

@SuperQ SuperQ merged commit 7489f4f into prometheus-community:master Dec 19, 2024
2 checks passed
k0ste added a commit to k0ste/smartctl_exporter that referenced this pull request Dec 19, 2024
* [CHANGE] `slog` used for logging instead go logger prometheus-community#246
* [ENHANCEMENT] Added support for `megaraid` devices and device types prometheus-community#205 prometheus-community#257
* [BUGFIX] Better support for smartmontools < 7.3 prometheus-community#238
* [BUGFIX] Corrected NVMe read/write bytes to NVMe metrics prometheus-community#211

Signed-off-by: Konstantin Shalygin <[email protected]>
@k0ste k0ste mentioned this pull request Dec 19, 2024
SuperQ pushed a commit that referenced this pull request Dec 20, 2024
* [CHANGE] `slog` used for logging instead go logger #246
* [ENHANCEMENT] Added support for `megaraid` devices and device types #205 #257
* [BUGFIX] Better support for smartmontools < 7.3 #238
* [BUGFIX] Corrected NVMe read/write bytes to NVMe metrics #211

Signed-off-by: Konstantin Shalygin <[email protected]>
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.

4 participants