Extracting many optional comma separated fields using Grok Pattern?

281 views Asked by At

I have below example in single line of text:

valuationType=RiskAnalysis,
commandType=SpreadRA,
pricing_date=20161230 01:00:00.000, 
priority=51,
CamelFileLastModified=1483346829000,
CamelFileParent=/home/tisuat52/mount/tis/shared, message_size=239450,
solstis_set_name=OFFICIAL, 
CamelFileRelativePath=TIS_RISKONE_SpreadRA_CREDITASIACNH_OFF_CreditGamma_Ido_RA_2016-12-30_1483138799000_Input.bin, 
command_status=OK, 
commandName=CREDITASIACNH_OFF_CreditGamma_Ido_RA, 
calculator_timestamp=20170102 04:35:41.257, 
CamelFileAbsolute=true, 
CamelFileLength=53248. 

Want to extract all text (mixed string, that is .*) right side of = to field whose name is left side of = and each field is separated by ,. And important is order is fixed but some fields are optional. If the Field is not present grok should create a field with empty value.

0

There are 0 answers