summaryrefslogtreecommitdiff
path: root/data/templates/ids/fastnetmon.j2
diff options
context:
space:
mode:
authorNicolás Fort <95703796+nicolas-fort@users.noreply.github.com>2023-07-31 15:22:51 -0300
committerGitHub <noreply@github.com>2023-07-31 15:22:51 -0300
commit657a566df58478c2f5d4bccad952bfcb7991e847 (patch)
tree1cf6ab7548286f358d05389132cd82bc177c676a /data/templates/ids/fastnetmon.j2
parent7ae9d8953ddc9ba38d62400187ce1ec44abb5a6e (diff)
parentdf33f450b4e8b7e0286e36540de81edfb5f52e73 (diff)
downloadvyos-1x-657a566df58478c2f5d4bccad952bfcb7991e847.tar.gz
vyos-1x-657a566df58478c2f5d4bccad952bfcb7991e847.zip
Merge branch 'current' into T5014-dnat
Diffstat (limited to 'data/templates/ids/fastnetmon.j2')
-rw-r--r--data/templates/ids/fastnetmon.j211
1 files changed, 10 insertions, 1 deletions
diff --git a/data/templates/ids/fastnetmon.j2 b/data/templates/ids/fastnetmon.j2
index 0340d3c92..f6f03d0db 100644
--- a/data/templates/ids/fastnetmon.j2
+++ b/data/templates/ids/fastnetmon.j2
@@ -29,10 +29,19 @@ unban_only_if_attack_finished = on
# For each subnet, list track speed in bps and pps for both directions
enable_subnet_counters = off
-{% if mode.mirror is vyos_defined %}
+{% if mode is vyos_defined('mirror') %}
mirror_afpacket = on
+{% elif mode is vyos_defined('sflow') %}
+sflow = on
+{% if sflow.port is vyos_defined %}
+sflow_port = {{ sflow.port }}
+{% endif %}
+{% if sflow.listen_address is vyos_defined %}
+sflow_host = {{ sflow.listen_address }}
+{% endif %}
{% endif %}
+
process_incoming_traffic = {{ 'on' if direction is vyos_defined and 'in' in direction else 'off' }}
process_outgoing_traffic = {{ 'on' if direction is vyos_defined and 'out' in direction else 'off' }}