首页 > 技术文章 > Splunk_使用临时数据关联查询 inputlookup

congxinglong 2020-07-16 14:34 原文

原始数据

本例以Splunk自带的索引 _audit来演示,原始数据量如下:

index="_audit"
| stats count by user

准备临时数据

准备数据并保存为文件 testdata.csv

将数据导入Splunk

1.进入查找界面

2.新增查找

3.上载文件,填写文件名,保存

查询临时数据

| inputlookup testdata.csv

关联查询

index=_audit
| join type=inner user
    [| inputlookup testdata.csv]
| stats count by user

推荐阅读