fix(inputs.smartctl): Use --scan-open instead of --scan to provide correct device type info (#15724)
This commit is contained in:
parent
27db10eefc
commit
706e922dff
|
|
@ -48,7 +48,7 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
|
|
||||||
## Devices to include or exclude
|
## Devices to include or exclude
|
||||||
## By default, the plugin will use all devices found in the output of
|
## 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.
|
## sets the specific devices to scan, while exclude omits specific devices.
|
||||||
# devices_include = []
|
# devices_include = []
|
||||||
# devices_exclude = []
|
# devices_exclude = []
|
||||||
|
|
@ -96,7 +96,7 @@ Defaults!SMARTCTL !logfile, !syslog, !pam_session
|
||||||
This plugin uses the following commands to determine devices and collect
|
This plugin uses the following commands to determine devices and collect
|
||||||
metrics:
|
metrics:
|
||||||
|
|
||||||
* `smartctl --json --scan`
|
* `smartctl --json --scan-open`
|
||||||
* `smartctl --json --all $DEVICE --device $TYPE --nocheck=$NOCHECK`
|
* `smartctl --json --all $DEVICE --device $TYPE --nocheck=$NOCHECK`
|
||||||
|
|
||||||
Please include the output of the above two commands for all devices that are
|
Please include the output of the above two commands for all devices that are
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
## Devices to include or exclude
|
## Devices to include or exclude
|
||||||
## By default, the plugin will use all devices found in the output of
|
## 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.
|
## sets the specific devices to scan, while exclude omits specific devices.
|
||||||
# devices_include = []
|
# devices_include = []
|
||||||
# devices_exclude = []
|
# devices_exclude = []
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is here so we can override it during testing
|
// This is here so we can override it during testing
|
||||||
var scanArgs = []string{"--json", "--scan"}
|
var scanArgs = []string{"--json", "--scan-open"}
|
||||||
|
|
||||||
type scanDevice struct {
|
type scanDevice struct {
|
||||||
Name string
|
Name string
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue