Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question. Don’t forget to select tags to help index your topic!
Hi! I am trying to extract information coming from aws flowlogs in message filed as:
in order to extract the ${srcaddr} ${flow-direction} ${action} ${traffic-path} from the whole message what can I do? What rule can be made please share an example to extract the above fields only and drop rest of the information.
the message field after filtration will look like this: 10.0.0.0 ingress ACCEPT -
Thanks for the update @gsmith
I am sorry I think I didn’t clarify the requirements. You are trying to add extractor based on only 1 parameter which is destination Ip but instead I want to extract few inputs (like ${srcaddr} ${flow-direction} ${action} ${traffic-path}) from the message filed
and store it in the message field and drop the rest of the fields that I am not interested in, ideal message filed after extraction should look like this:
I was trying to play with extractors and came across with this:
When new same like messages comes in, the Fields will be extracted and these Fields will be shown before or after the message field: srcaddr, flow-direction, action etc …
see this example:
you can also use the Graylog search engine and search for: srcaddr: * AND Action: “REJECT” AND flow_direction: “ingress”
Btw go back to the created grok pattern and change flow-direction to flow_direction and save
thanks a lot! btw which api can I use to extract these fields from last 24hours timestamp?
Please note that I have tried /api/messages/index/messageID but it retrieves only one result. I need to have results for last 24 hours