2014-07-23 31 views
1

我想倾倒在Splunk的保存下列XML日志文件记住一个事实,即它应该给所有的标签作为一个领域,这样我可以搜索的事件,其中倾销XML日志文件转换成Splunk的

文本=”应用:目录开始”类别= “BIG” 模块= “WorkflowHost”

我应该在props.conf

<Message> 
    <ID> 
    b476f836-36dd-4c30-9a8e-0587c5d34b8d- 
    </ID> 
    <Date> 
    2014-01-09 10:45:31.69 
    </Date> 
    <Text> 
    Application: Directory started 
    </Text> 
    <Category> 
    BIG 
    </Category> 
    <Source> 
    Workflow 
    </Source> 
    <Level> 
    Event 
    </Level> 
    <Class> 
    General 
    </Class> 
    <Module> 
    WorkflowHost 
    </Module> 
    <LineNumber> 
    0 
    </LineNumber> 
    <ProcessID> 
    5420 
    </ProcessID> 
    <User> 
    e2ac3262e9b9d03f 
    </User> 
</Message> 


<Message> 
    <ID> 
    b476f836-36dd-4c30-9a8e-0587c5d34b8d 
    </ID> 
    <Date> 
    2014-01-09 10:45:41.57 
    </Date> 
    <Text> 
    Application: PatientDirectory started 
    </Text> 
    <Category> 
    BIG 
    </Category> 
    <Source> 
    PatientDirectory 
    </Source> 
    <Level> 
    Event 
    </Level> 
    <Class> 
    General 
    </Class> 
    <Module> 
    PatientDirectory 
    </Module> 
    <LineNumber> 
    0 
    </LineNumber> 
    <ProcessID> 
    2180 
    </ProcessID> 
    <User> 
    e2ac3262e9b9d03f 
    </User> 
</Message> 

请帮助写.... :)

回答

1

在你的道具。 CONF节的索引,添加

KV_MODE=xml 

这会自动提取所有字段和值。

您可以找到props.conf文件文档在这里更多的细节:

http://docs.splunk.com/Documentation/Splunk/latest/Admin/propsconf