host-metrics: bind-mount /dev for inputs.diskio
`inputs.diskio` enumerates devices from /proc/diskstats and then opens /dev/<name> for udev/uevent lookups. The container's /dev only has docker's minimal set, so telegraf logs an "error reading /dev/<name>" warning per device per collection cycle. Mount the host's /dev read-only so device lookups succeed.pull/753/head
parent
6726d68100
commit
b7b6bcf731
|
|
@ -21,3 +21,8 @@ services:
|
||||||
- /proc:/hostfs/proc:ro
|
- /proc:/hostfs/proc:ro
|
||||||
- /sys:/hostfs/sys:ro
|
- /sys:/hostfs/sys:ro
|
||||||
- /:/hostfs:ro
|
- /:/hostfs:ro
|
||||||
|
# /dev is needed by inputs.diskio: it enumerates devices from
|
||||||
|
# /proc/diskstats and then opens /dev/<name> for udev/uevent lookups.
|
||||||
|
# Without this mount telegraf logs an "error reading /dev/<name>" warning
|
||||||
|
# per device per collection cycle.
|
||||||
|
- /dev:/dev:ro
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue