Commit c9b41df
committed
feat: Make handling of invalid devices configurable
Currently, whenever there are devices that are invalid, smartctl_exporter will
log an error stating that the device can not be opened, refering to potential
issues with missing IDENTIFY_DEVICE structures or low-power-mode-devices.
There are, however, also situations where (virtual) devices disappear
from the host and are not properly cleaned up. Here, `open()`ing the
device in smartctl fails with ENXIO, resulting in the error message
"No such device or address" being returned. In this case, the error
just clutters the log output for no reason, as there is no reasonable
action that can be taken.
This MR makes the experienced behavior for such cases configurable.
One can either specify the newly added flag `--smartctl.exclude-enxio`
to ensure that devices with such problems are simply silently ignored,
or decide to ignore the flag and continue experiencing the current
behavior.
Signed-off-by: Markus Kostrzewski <[email protected]>1 parent 0c86f73 commit c9b41df
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
135 | 145 | | |
136 | 146 | | |
137 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments