Adding to @richgalloway 's remarks about your problem being incorrectly formulated (maybe you wanted something else but didn't word it properly), this is a very badly used join command. As a rule of thumb the join command is to be avoided whenever possible. Your search can be equally well rewritten without it. Oh, and if you limit yourself to just one index with tstats' where condition there's no point of adding index to the by clause. So effectively your initial search might be swapped around and rewritten as | tstats count where index="bbs-firewall" earliest=-24h by sourcetype | append [ | makeresults | eval sourcetype=split("BBCN-Kunshan,BSCN-Suzhou,BBSP-Malasiya,BTCN-Tianjin,BXCN-Xian,BCCN-Suzhouheadquarters,BCIT-Italy", ",") | mvexpand sourcetype | eval count=0 ] | stats sum(count) as count by sourcetype | ...
... View more