Thanks a lot Magnus. That helped. I'm using a text file with logs in it as the input for my logstash config. Just trying to use grok to match the format of the log. More like a practice . I need your suggestion to work out this,
[uni/ten-[uni/tn-DevVFtd59]-scriptHandlerState/LDevOpInf-Dev]
I would like to store the entire information between the brackets in one field. Something like,
"Field_name" = "uni/ten-[uni/tn-DevVFtd59]-scriptHandlerState/LDevOpInf-Dev"
I'm using match of grok to do this. I tried using GREEDYDATA to get this done but, it didn't work. It replaced values of other fields that I've stored ahead of this one.
So, I've tried to match everything inside the brackets and created multiple fields to store information. It would be so easy for me if I could store the entire thing inside the brackets in to one field. Could you please suggest something here.
Example :
{"message":"<190><190> Oct 04 21:26:11 apic1 %LOG_LOCAL7-6-SYSTEM_MSG [E4207683][transition][info][uni/ten-[uni/tn-DevVFtd59]-scriptHandlerState/LDevOpInf-Dev] LDevOperInfo Dev modified"}
My Filter:
grok {
match => { "message" => "<%{NUMBER:STARTCODE01}><%{NUMBER:STARTCODE2}> %{SYSLOGTIMESTAMP:LogTimeStamp} %{WORD:MessageSource} %LOG_LOCAL%{INT:FacilityLevel}%{NOTSPACE}%{INT:SeverityLevel}%{NOTSPACE}SYSTEM%{NOTSPACE}MSG %{NOTSPACE}%{BASE16NUM:ErrorCode}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{WORD:LifeCycleState}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{WORD:ITULevel}%{NOTSPACE}%{SPACE}%{NOTSPACE}%{WORD:RootName}%{NOTSPACE}%{WORD:SubFolderName}%{NOTSPACE}%{NOTSPACE}%{WORD:RootName}%{NOTSPACE}%{WORD:SubFolderName}%{NOTSPACE}%{WORD:TenantName}%{NOTSPACE}%{NOTSPACE}%{WORD:StateName}%{NOTSPACE}%{WORD:LDevOpInf}%{NOTSPACE}%{WORD:LDevName}%{NOTSPACE}%{SPACE}%{GREEDYDATA:Message}"}
}
Thanks.