From 6ecbf4f21cf9eb881f88a12d62777fe88ef707e8 Mon Sep 17 00:00:00 2001 From: Anze Date: Fri, 17 Nov 2023 08:05:02 +0100 Subject: [PATCH] OUTPUT_SNMP might be missing --- netflowwriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netflowwriter.py b/netflowwriter.py index 467396c..3601395 100644 --- a/netflowwriter.py +++ b/netflowwriter.py @@ -220,8 +220,8 @@ def _get_data(buffer): f.data.get("DIRECTION", DIRECTION_INGRESS), f.data.get("L4_DST_PORT", 0), # sometimes ports are not available: https://github.com/grafolean/grafolean/issues/13 f.data.get("L4_SRC_PORT", 0), - f.data["INPUT_SNMP"], - f.data["OUTPUT_SNMP"], + f.data.get("INPUT_SNMP", 0), + f.data.get("OUTPUT_SNMP", 0), # sometimes OUTPUT_SNMP is not available: https://github.com/grafolean/grafolean/issues/41 - not sure about INPUT_SNMP, better safe... address_family, dst, src,