避免在 splunk 查询中使用事务
Avoid using Transaction in splunk queries
我正在寻找不使用事务来编写 splunk 查询的替代方法
例子
假设 r 在两个搜索中都是唯一字段
(sourcetype=* "搜索日志 1") 或 (sourcetype=* "搜索日志 2") |事务 r startswith="X" endsWith="y" maxspan=4s
通常,stats
会被发现是你的好友
但是,在没有看到示例数据或您目前尝试过的实际 SPL 的情况下,任何答案都主要是猜测:)
我很乐意更新这个答案if/when你提供了这样的答案,但这是一个可能的开始:
(index=ndxA sourcetype=srctpA "search log 1" r=*) OR (index=ndxB sourcetype=srctpB "search log 2" r=*)
| stats min(_time) as begintime max(_time) as endtime values(index) as rindex values(sourcetype) a rsourcetype by r
| eval begintime=strftime(begintime,"%c"), endtime=strftime(endtime,"%c")
我正在寻找不使用事务来编写 splunk 查询的替代方法 例子 假设 r 在两个搜索中都是唯一字段 (sourcetype=* "搜索日志 1") 或 (sourcetype=* "搜索日志 2") |事务 r startswith="X" endsWith="y" maxspan=4s
通常,stats
会被发现是你的好友
但是,在没有看到示例数据或您目前尝试过的实际 SPL 的情况下,任何答案都主要是猜测:)
我很乐意更新这个答案if/when你提供了这样的答案,但这是一个可能的开始:
(index=ndxA sourcetype=srctpA "search log 1" r=*) OR (index=ndxB sourcetype=srctpB "search log 2" r=*)
| stats min(_time) as begintime max(_time) as endtime values(index) as rindex values(sourcetype) a rsourcetype by r
| eval begintime=strftime(begintime,"%c"), endtime=strftime(endtime,"%c")