The logic in the case
statement is faulty. Just about everything will match src!=ip1 OR src!=ip2 OR blocked=1
. I think some of the OR
s should be AND
s and that some parentheses are needed.
Maybe this is closer to what is intended?
eval BlockedStatus = case ( src !="ip1" AND src !="ip2" AND
blocked=1,"india without scanner IP blocked", src !="ip1" AND src !="ip2" AND
blocked=0 ,"india without scanner IP nonblocked" ,(src ="ip1" OR src ="ip2")
AND blocked=1,"india with scanner IP blocked", (src ="ip1" OR src ="ip2") AND
blocked=0 ," india with scanner Ip non blocked ", 1==1, "Error")
| stats count by eventtype,BlockedStatus
| rename eventtype as "Local Market",count as "Total Critical Events"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…