I cant parse with grok

Hi! I'am new in logstash.
My example log:
30116102503C01 016405404007100
I want parse the next way:

30116102503C
01
0164054
04007
100

But, I've only managed to do this:

{
"tipo": [
"30116102503C"
],
"tipo2": [
"01"
],
"tipo3": [
"016405404007100"
]
}

With this:

%{USERNAME:tipo}%{NUMBER:tipo2}%{SPACE}%{SPACE}%{SPACE}%{SPACE}%{SPACE}%{NUMBER:tipo3}

I can not find the way to count characters and separate them

Thanks!

Use {N} to match N occurrences of the preceding token, i.e. [A-Z0-9]{12} matches 12 letters and digits.

1 Like

Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.