Skip to content

Commit

Permalink
fix: Add SMART plugin concurrency configuration option, nvme-cli v1.1…
Browse files Browse the repository at this point in the history
…4+ support and lint fixes.
  • Loading branch information
KubaTrojan committed Nov 24, 2021
1 parent 84e7a6a commit 0b2a2f1
Show file tree
Hide file tree
Showing 3 changed files with 422 additions and 69 deletions.
22 changes: 21 additions & 1 deletion plugins/inputs/smart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ smartctl --scan -d nvme

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

## Optionally call smartctl and nvme-cli sequentially to gather disk attributes.
## 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 false
## to get readings for all drives.
# parallel_reads = true
```

## Permissions
Expand Down Expand Up @@ -235,13 +242,26 @@ 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 parallel_reads and change it to false:

```toml
## Optionally call smartctl and nvme-cli sequentially to gather disk attributes.
## 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 false
## to get readings for all drives.
parallel_reads = false
```

## Example SMART Plugin Outputs

```shell
Expand Down
Loading

0 comments on commit 0b2a2f1

Please sign in to comment.