alexreinert/homematic_check_mk

error with to many or new parameter outputs from diskstats

Opened this issue · 0 comments

Hallo
Description:
After upgrade from RasberryMatic, i found a bug on my check_mk check diskstats.
It seem, that it have now four additional parameters (... 0 0 0 0) on each line output from /proc/diskstats.
My temporary fix to them was following changing (diff/patch format) into addon/addon/server.tcl:

...
73c73
< puts $channelId "[exec egrep { (x?[shv]d[a-z]*|cciss/c[0-9]+d[0-9]+|emcpower[a-z]+|dm-[0-9]+|VxVM.*|mmcblk.*|dasd[a-z]*|bcache[0-9]+|nvme[0-9]+n[0-9]+|mtdblock.+) } < /proc/diskstats]"


> puts $channelId "[exec sed -e {s/ 0 0 0 0$/\n/} | egrep { (x?[shv]d[a-z]*|cciss/c[0-9]+d[0-9]+|emcpower[a-z]+|dm-[0-9]+|VxVM.*|mmcblk.*|dasd[a-z]*|bcache[0-9]+|nvme[0-9]+n[0-9]+|mtdblock.+) } < /proc/diskstats]"

this change have no impact to old RasberryMatic versions and is compatible with the new output from /proc/diskstats.

My current environment:

  • check_mk server: Odroid HC1 hardware, Linux hc101 4.14.157-171 #1 SMP PREEMPT Wed Dec 4 08:21:54 -03 2019 armv7l armv7l armv7l GNU/Linux
  • RasberryMatic: RasberryPi 3B+, RasberryMatic 3.51.6.2020422

Best regards

Gernot Krause