summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/smartd_log/README.md
blob: a31ad0c7ac926fc701722a68dbf4cf781333c485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# smartd_log

Module monitor `smartd` log files to collect HDD/SSD S.M.A.R.T attributes.

**Requirements:**
* `smartmontools`

It produces following charts for SCSI devices:

1. **Read Error Corrected**

2. **Read Error Uncorrected**

3. **Write Error Corrected**

4. **Write Error Uncorrected**

5. **Verify Error Corrected**

6. **Verify Error Uncorrected**

7. **Temperature**


For ATA devices:
1. **Read Error Rate**

2. **Seek Error Rate**

3. **Soft Read Error Rate**

4. **Write Error Rate**

5. **SATA Interface Downshift**

6. **UDMA CRC Error Count**

7. **Throughput Performance**

8. **Seek Time Performance**

9. **Start/Stop Count**

10. **Power-On Hours Count**

11. **Power Cycle Count**

12. **Unexpected Power Loss**

13. **Spin-Up Time**

14. **Spin-up Retries**

15. **Calibration Retries**

16. **Temperature**

17. **Reallocated Sectors Count**

18. **Reserved Block Count**

19. **Program Fail Count**

20. **Erase Fail Count**

21. **Wear Leveller Worst Case Erase Count**

22. **Unused Reserved NAND Blocks**

23. **Reallocation Event Count**

24. **Current Pending Sector Count**

25. **Offline Uncorrectable Sector Count**

26. **Percent Lifetime Used**

### prerequisite
`smartd` must be running with `-A` option to write smartd attribute information to files.

For this you need to set `smartd_opts` (or `SMARTD_ARGS`, check _smartd.service_ content) in `/etc/default/smartmontools`:


```
# dump smartd attrs info every 600 seconds
smartd_opts="-A /var/log/smartd/ -i 600"
```


`smartd` appends logs at every run. It's strongly recommended to use `logrotate` for smartd files.

### configuration

```yaml
local:
  log_path : '/var/log/smartd/'
```

If no configuration is given, module will attempt to read log files in `/var/log/smartd/` directory.

---