Filter specific words from a field in logstash

(saisn) #1

I'm pulling data from SQL and one of the table has field called 'description' which contains values like alarm created, alarm discontinued, sound generated, api called, api call failed.
All I wanted to do is capture only specific words like 'alarm','sound','api' from the value. How can I achieve this in logstash

(Nachiket) #2

You will have to use the grok filter on the specified field.


(saisn) #3

Can you please elaborate as how to do it with grok. Here, the match is made on custom words

(Nachiket) #4

In grok, you write patterns to match the message field. Now in case you want to pick specific value from the description Field. Write a grok to match the values you need. You can write custom patterns or use regex.

Hope this helps.

(system) #5

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