You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin performs filtering of flow records based on an filter expression.
5
+
Flow records not matching the specified filtering criteria are discarded.
6
+
7
+
8
+
Supported operations
9
+
--------------------
10
+
11
+
- Comparison operators `==`, `<`, `>`, `<=`, `>=`, `!=`. If the comparison operator is ommited, the default comparison is `==`.
12
+
13
+
- The `contains` operator for substring comparison, e.g. `DNSName contains "example"`.
14
+
15
+
- Arithmetic operations `+`, `-`, `*`, `/`, `%`.
16
+
17
+
- Bitwise operations not `~`, or `|`, and `&`, xor `^`.
18
+
19
+
- The `in` operator for list comparison, e.g. `port in [80, 443]`.
20
+
21
+
- The logical `and`, `or`, `not` operators.
22
+
23
+
24
+
Value types
25
+
-----------
26
+
27
+
- Numbers can be integer or floating point. Integer numbers can also be written in their hexadecimal or binary form using the `0x` or `0b` prefix.
28
+
Floating point numbers also support the exponential notation such as `1.2345e+2`. A number can be explicitly unsigned using the `u` suffix.
29
+
Numbers also support size suffixes `B`, `k`, `M`, `G`, `T`, and time suffixes `ns`, `us`, `ms`, `s`, `m`, `d`.
30
+
31
+
- Strings are values enclosed in a pair of double quotes `"`. Supported escape sequences are `\n`, `\r`, `\t` and `\"`.
32
+
The escape sequences to write characters using their octal or hexadecimal value are also supported, e.g. `\ux22` or `\042`.
33
+
34
+
- IP addresses are written in their usual format, e.g. `127.0.0.1` or `1234:5678:9abc:def1:2345:6789:abcd:ef12`. The shortened IPv6 version is also supported, e.g. `::ff`.
35
+
IP addresses can also contain a suffix specifying their prefix length, e.g. `10.0.0.0/16`.
36
+
37
+
- MAC addresses are written in their usual format, e.g. `12:34:56:78:9a:bc`.
38
+
39
+
- Timestamps use the ISO timestamp format, e.g. `2020-04-05T24:00Z`.
40
+
41
+
42
+
IPFIX field identificators
43
+
--------------------------
44
+
45
+
IPFIX fields can be identified using their name specified in the IPFIX information elements table or their alias defined in the `aliases.xml` file.
46
+
If the IPFIX name is used and the default iana table is being referred, the `iana:` prefix can be ommited.
47
+
Note that one alias can point to multiple IPFIX information elements.
48
+
The default location of the aliases file is `/etc/libfds/system/aliases.xml`.
49
+
50
+
51
+
Value mappings
52
+
--------------
53
+
54
+
Commonly used values can be mapped to a name using the `mappings.xml` file, for example the name `http` when used in an expression `port http` can refer to the value 80.
55
+
These names can have different meanings depending on the IPFIX field they're being compared with.
56
+
The default location of the mappings file is `/etc/libfds/system/mappings.xml`.
57
+
58
+
59
+
Example configuration
60
+
---------------------
61
+
62
+
.. code-block:: xml
63
+
64
+
<intermediate>
65
+
<name>Filter</name>
66
+
<plugin>filter</plugin>
67
+
<params>
68
+
<expr>ip 10.0.0.0/16 and port in [80, 8080]</expr>
0 commit comments