我试图用splunk重新创建此SQL查询,但发现它很困难:
SELECT DISTINCT server_name,dns_ips,serial_number
from table1 t1
WHERE
not exists (select 1 FROM [table2] where name = t1.server_name)
and not exists (select 1 FROM [table2] where ip_address = t1.dns_ips)
order by dns_ips
我已经尝试使用join在splunk查询中执行join语句:
index=indexOrigin source=table1
NOT [search index=indexOrigin source=table2
| eval name=server_name, dns_ips=ip_address | fields dns_ips]
此查询完全不执行任何操作。它会匹配每种情况,并且不会过滤掉应有的内容。