Extracting many optional comma separated fields using Grok Pattern?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:23:26

问题


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.

来源:https://stackoverflow.com/questions/41426198/extracting-many-optional-comma-separated-fields-using-grok-pattern

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!