-
Notifications
You must be signed in to change notification settings - Fork 311
Description
During a workshop we collected some feedback on needed filtering possibilities. We now came up with this list of useful comparisons. Could be implemented by an abstract base class and derived specific classes.
I used pseudo code for easier reading.
Generic filter
The filter bot shall support these generic filtering comparisons:
Match any key in the event against a value with these comparison operators:
-
==
-
<
,>
-
<=
,>=
-
!=
-
in
, e.g.source.asn in [1234, 1235]
-
~=
, matching: extended regex, withre.search
(ENH: Filterexpert can now use RegEx #676) - exists/
is not None
- not exists/
is None
Ip specific filtering
In particular, the filter bot shall have a derived class "IPAddressFilter" which can compare:
source.ip, destination.ip, source.network, destination.network against a value with these comparators:
-
ip = '192.0.2.1'
-
ip in '192.0.2.1-192.0.2.10'
-
ip in ['192.0.2.1', '192.0.2.2']
-
ip in '192.0.2.0/24'
-
ip in ['192.0.2.1-192.0.2.10', '192.0.2.100/28']
- for
source.ip
anddestination.ip
Time specific filtering:
Again this is a derived class.
Compare time.source, time.observation via:
-
<
,>
-
<=
,>=
-
==
-
!=
- absolute
- relative
comments appreciated
EDIT 2016-07-18: Added exists
EDIT 2016-09-07: ip-filtering: different entries in lists