Reputation: 93
I am trying to grok this inputs with logstash,
Nicolas Lauri 34
Nicolas 33 #there is one space and it not works.
Nicolas 33 #there are two spaces and it works.
with this pattern
(%{WORD:firstname})? (%{WORD:lastname})? (%{NUMBER:age})?
Using the ()? I ignore missing values and say that are optionals, but the problem is we must put spaces between value to make it works.
i mean if i have this input:
Nicolas 19
i must put exactly two spaces between Nicolas et 19 to grok it correctly.
What should i do to avoid putting spaces ?
Upvotes: 1
Views: 2754
Reputation: 16362
Two choices:
Upvotes: 1