Splunk:如何 select 不匹配两个源类型的数据

Splunk: how to select not matching data across two sourcetype

我在 splunk 中有以下两种不同来源类型的数据

index="xyz" sourcetype="资产"

name
--------
SERVER01
SERVER02
SERVER03

index="xyz" sourcetype="计算机"

name
--------
SERVER02
SERVER03
SERVER05

我正在尝试获取在两种源类型中都不匹配的数据

 name
 --------
 SERVER01
 SERVER05

我尝试使用外部连接进行数据选择,如下所述,但似乎不起作用

index="xyz" sourcetype="assets"
| table name
| join type=outer name
   [| search index="xyz" sourcetype="computers"
    | table name]
| table name

请推荐

stats 命令可以做到这一点。从每个源类型收集服务器并计算它们的数量。计数为 1 的不匹配。

index=xyz (sourcetype=assets OR sourcetype=computers)
| stats count by name
| where count = 1
| table name