Graylog的Grok模式

时间:2018-09-07 08:13:51

标签: design-patterns grok graylog2

我正在检索要使用Graylog分析的数据。

数据如下所示,

[{"tag":"DO_SIMU[199].1","value":"False","time":"2018-09-05T14:35:09.1189226+02:00"}]
[{"tag":"DO_SIMU[199].2","value":"True","time":"2018-10-05T14:35:09.1189226+02:00"}]
[{"tag":"asefsfdfsd","value":"135","time":"2018-09-05T14:35:09.1189226+02:00"}]
[{"tag":"tit.1","value":"152.551","time":"2018-09-05T14:35:09.1189226+02:00"}]
[{"tag":"DO_SIMU[1].2551","value":"False","time":"6454-09-05T14:35:09.1189226+02:00"}]
[{"tag":"kfmdsfsmdlf.i1","value":"maman","time":"2018-09-05T14:35:09.1189226+15:251"}]

我必须为每行创建一个带有标签值的变量(例如,DO_SIMU [199] .1或kfmdsfsmdlf.i1),并将该值value放入该值

使用json,这最后一步似乎很简单

所以我正在寻找创建一个grok模式,该模式会给我类似的东西

{"DO_SIMU[199].1":"False"}

排除所有其余部分。

如果有人有一个主意,我先谢谢他。

0 个答案:

没有答案