Splunk:提取具有相同名称的多个字段

时间:2012-02-27 11:23:56

标签: splunk

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

在此事件的自动提取中,我只为“to”字段提取“email1@example.com”。如何确保提取所有值?

谢谢!

1 个答案:

答案 0 :(得分:2)

我认为将此添加到搜索结尾可能会这样做:

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

('表'仅用于演示)。

所以,我认为,在'transforms.conf'中(来自http://docs.splunk.com/Documentation/Splunk/latest/admin/transformsconf)put:

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

并在'props.conf'中引用它:

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

其中'eventtype :: my_custom_eventtype'可以是作为'props.conf'规范的任何内容(< spec> in http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf)。

相关问题