【发布时间】:2022-01-03 09:26:27
【问题描述】:
我有一个搜索包含很多子搜索,它们的格式相同
| union
[| search index=idx_dash
| spath Data.AA{} AA
| mvexpand AA | eval _raw=AA
| spath Key output=Key | spath Value output=Value | where Key="**aaa**"
| rex mode=sed field=Value "s/\+/e+/g" | eval Value=tonumber(Value)
| xyseries Key Value
| eval **"Aa"** = 'aa' ]
[| search index=idx_dash
| spath Data.BB{} BB
| mvexpand BB | eval _raw=BB
| spath Key output=Key | spath Value output=Value | where Key="**bbb**"
| rex mode=sed field=Value "s/\+/e+/g" | eval Value=tonumber(Value)
| xyseries Key Value
| eval **"Bb"** = 'bb' ]
有什么方法可以替换子搜索中的关键字,以便我可以使用一个子搜索使其有用吗?感谢您的帮助。
【问题讨论】:
标签: sql splunk splunk-query