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

fix: use --scan-open instead of --scan of smartctl to provide correct… #15724

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/inputs/smartctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.

## Devices to include or exclude
## By default, the plugin will use all devices found in the output of
## `smartctl --scan`. Only one option is allowed at a time. If set, include
## `smartctl --scan-open`. Only one option is allowed at a time. If set, include
## sets the specific devices to scan, while exclude omits specific devices.
# devices_include = []
# devices_exclude = []
Expand Down Expand Up @@ -96,7 +96,7 @@ Defaults!SMARTCTL !logfile, !syslog, !pam_session
This plugin uses the following commands to determine devices and collect
metrics:

* `smartctl --json --scan`
* `smartctl --json --scan-open`
* `smartctl --json --all $DEVICE --device $TYPE --nocheck=$NOCHECK`

Please include the output of the above two commands for all devices that are
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/smartctl/sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Devices to include or exclude
## By default, the plugin will use all devices found in the output of
## `smartctl --scan`. Only one option is allowed at a time. If set, include
## `smartctl --scan-open`. Only one option is allowed at a time. If set, include
## sets the specific devices to scan, while exclude omits specific devices.
# devices_include = []
# devices_exclude = []
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/smartctl/smartctl_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// This is here so we can override it during testing
var scanArgs = []string{"--json", "--scan"}
var scanArgs = []string{"--json", "--scan-open"}

type scanDevice struct {
Name string
Expand Down
Loading