I'm trying to build a query for ssh traffic-- for my field names, if the ipProtocol is 6 (tcp) and srcPort is 22 or dstPort is 22, then this is a match.
In timelion I've created the following two queries:
.es(index=sessions2*, q="ipProtocol:6 and (dstPort:22 or srcPort:22)", timefield=lastPacket,metric=count).color(red).label("ssh-lower-case"),
.es(index=sessions2*, q="ipProtocol:6 AND (dstPort:22 OR srcPort:22)", timefield=lastPacket,metric=count).color(blue).label("ssh-upper-case").points(show=true).lines(show=true)
and the lines shown are different. Apparently the above two queries yield different results.
So two questions.
-
Is the above logic correct if I want "ipProtocol:6 and (srcPort:22 or dstPort:22)"?
-
Does case matter and if so should it be upper or lower?
THanks