2012-02-27 109 views
1

我正在使用Splunk将具有相同名称的多个字段的日志编入索引。所有字段的含义相同: 2012-02-22 13:10:00,ip = 127.0.0.1,to = email1 @ example.com,to = email2 @ example.comSplunk:提取具有相同名称的多个字段

在自动提取中事件中,我只会将“[email protected]”提取为“to”字段。我怎样才能确保提取所有的值?

谢谢!

回答

2

我认为加上这给搜索结束,这可能做到这一点:

| extract pairdelim="," kvdelim="=" mv_add=t | table to 

(以下简称“表”仅仅是用于演示)。

所以,我认为,在 'transforms.conf'(从http://docs.splunk.com/Documentation/Splunk/latest/admin/transformsconf)提出:

[my-to-extraction] 
DELIMS = ",", "=" 
MV_ADD = true 

和 'props.conf' 引用它:

[eventtype::my_custom_eventtype] 
REPORT-to = my-to-extraction 

其中“事件类型:: my_custom_eventtype'可以是任何可用作'props.conf'规范的东西(<规范>在http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf)。

相关问题