Add troubleshooting section to smart input docs

This commit is contained in:
Daniel Nelson 2019-06-21 12:14:14 -07:00
parent 6738d566dd
commit 587dd149f3
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 18 additions and 4 deletions

View File

@ -24,7 +24,7 @@ To enable SMART on a storage device run:
smartctl -s on <device>
```
### Configuration:
### Configuration
```toml
# Read metrics from storage devices supporting S.M.A.R.T.
@ -59,7 +59,7 @@ smartctl -s on <device>
# devices = [ "/dev/ada0 -d atacam" ]
```
### Permissions:
### Permissions
It's important to note that this plugin references smartctl, which may require additional permissions to execute successfully.
Depending on the user/group permissions of the telegraf user executing this plugin, you may need to use sudo.
@ -80,7 +80,7 @@ telegraf ALL=(ALL) NOPASSWD: SMARTCTL
Defaults!SMARTCTL !logfile, !syslog, !pam_session
```
### Metrics:
### Metrics
- smart_device:
- tags:
@ -142,7 +142,21 @@ devices can be referenced by the WWN in the following location:
To run `smartctl` with `sudo` create a wrapper script and use `path` in
the configuration to execute that.
### Output
### Troubleshooting
If this plugin is not working as expected for your SMART enabled device,
please run these commands and include the output in a bug report:
```
smartctl --scan
```
Run the following command replacing your configuration setting for NOCHECK and
the DEVICE from the previous command:
```
smartctl --info --health --attributes --tolerance=verypermissive --nocheck NOCHECK --format=brief -d DEVICE
```
### Example Output
```
smart_device,enabled=Enabled,host=mbpro.local,device=rdisk0,model=APPLE\ SSD\ SM0512F,serial_no=S1K5NYCD964433,wwn=5002538655584d30,capacity=500277790720 udma_crc_errors=0i,exit_status=0i,health_ok=true,read_error_rate=0i,temp_c=40i 1502536854000000000