Skip to content

Commit

Permalink
feat: Add SMART plugin concurrency configuration option, nvme-cli v1.…
Browse files Browse the repository at this point in the history
…14+ support and lint fixes. (#10150)

(cherry picked from commit d4475b7)
  • Loading branch information
KubaTrojan authored and reimda committed Dec 16, 2021
1 parent efa6522 commit 09ab980
Show file tree
Hide file tree
Showing 3 changed files with 479 additions and 96 deletions.
24 changes: 23 additions & 1 deletion plugins/inputs/smart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ smartctl --scan -d nvme

## Timeout for the cli command to complete.
# timeout = "30s"

## Optionally call smartctl and nvme-cli with a specific concurrency policy.
## By default, smartctl and nvme-cli are called in separate threads (goroutines) to gather disk attributes.
## Some devices (e.g. disks in RAID arrays) may have access limitations that require sequential reading of
## SMART data - one individual array drive at the time. In such case please set this configuration option
## to "sequential" to get readings for all drives.
## valid options: concurrent, sequential
# read_method = "concurrent"
```

## Permissions
Expand Down Expand Up @@ -235,13 +243,27 @@ the DEVICE (name of the device could be taken from the previous command):
smartctl --info --health --attributes --tolerance=verypermissive --nocheck NOCHECK --format=brief -d DEVICE
```

If you try to gather vendor specific metrics, please provide this commad
If you try to gather vendor specific metrics, please provide this command
and replace vendor and device to match your case:

```sh
nvme VENDOR smart-log-add DEVICE
```

If you have specified devices array in configuration file, and Telegraf only shows data from one device, you should
change the plugin configuration to sequentially gather disk attributes instead of collecting it in separate threads
(goroutines). To do this find in plugin configuration read_method and change it to sequential:

```toml
## Optionally call smartctl and nvme-cli with a specific concurrency policy.
## By default, smartctl and nvme-cli are called in separate threads (goroutines) to gather disk attributes.
## Some devices (e.g. disks in RAID arrays) may have access limitations that require sequential reading of
## SMART data - one individual array drive at the time. In such case please set this configuration option
## to "sequential" to get readings for all drives.
## valid options: concurrent, sequential
read_method = "sequential"
```

## Example SMART Plugin Outputs

```shell
Expand Down
Loading

0 comments on commit 09ab980

Please sign in to comment.