Hi @dtaylor I think something like the following might work for you? Ive tried to recreate it using some old dns/pihole data I have: In the screenshot you can see that there were 2 hosts which resolved google.com, and based on the earliest/latest of 60 seconds either side of those events, the 2 hosts also queried mask.icloud.com This is the query I used, the query is fairly obvious, the "src_ip" field is the client IP in this case. The return command returns the first <n> (100) src_ip/earliest/latest fields as an OR statement like this: (src_ip="192.168.0.197" earliest="1726212774" latest="1726212894") OR (src_ip="192.168.0.226" earliest="1726213512" latest="1726213632") That is fed into the main query as a subsearch, you then use stats to get a distinct count of src_ip and a count of src_ip by query to match the sources and queries, sort in descending order and your common domains should float to the top! index=pihole [search index=pihole query=google.com
| dedup src_ip
| eval earliest=_time-60, latest=_time+60
| return 100 src_ip earliest latest]
| stats dc(src_ip) as hostCount, values(src_ip) as hosts by query Please let me know how you get on and consider adding karma to this or any other answer if it has helped. Regards Will
... View more