For my case input can appear in one of the two formats listed below. ( First case tags are present while for other case no tags are present and everything is considered part of message)
Format 1 :
`2017-03-30 09:37:13,705;INFO ;machinename.6028.1.5f80c274-38ad-469f-857f-74e55e1b70fc.1;2.1.1;0;;Tag1.Tag2.Tag3:31; OutArguments are: TransactionSuccess=True;
and other times
Format 2
2017-03-30 09:37:13,743;INFO ;APANDE2-DESK8.6028.1.5f80c274-38ad-469f-857f-74e55e1b70fc.1;2.1.1;0;;calling logOutput for op Message data
I have created a input message filter like following
match=> { "full_message" => "(?[^;])[;](?[^;])[;]%{NUMBER:payloadSize};[;]%{GREEDYDATA:message_text}" }
What i have been trying to achieve is retrieve tag1, tag2 and tag3 when they are present and ignore otherwise.
my approach was to use message_text field created by match statement and then later use this field to retrieve tags (tag1, tag2, tag3) , i know there can be more than one way to achieve i am trying ,so other recommendations are welcome too.