Hey, im trying to process logs from iostat, the problem is i have different machines with 1 or 2 disks, which means i have logs with different number of lines
Example:
2017-01-03T10:41:35+0000
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 0,00 0,00 0,00 0 0
sdb 1,00 0,00 0,01 0 0
and
2017-01-03T10:37:43+0000
Device: tps MB_read/s MB_wrtn/s MB_read MB_wrtn
sda 50,00 0,00 0,53 0 0
Im using the following logstash grok expression:
%{TIMESTAMP_ISO8601:time5}\n%{GREEDYDATA}\n%{WORD:device1}[\s]+%{fl:tps1:float}[\s]+%{fl:read1:float}[\s]+%{fl:write1:float}%{GREEDYDATA}(\n%{WORD:device2:float}[\s]+%{fl:tps2:float}[\s]+%{fl:read2:float}[\s]+%{fl:write2:float}%{GREEDYDATA})?
i put the 2nd line as optional but still it s not working properly, anyone have any idea how to do this?
Thank you in advance