summaryrefslogtreecommitdiff
path: root/src/etc/telegraf
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/telegraf')
-rwxr-xr-xsrc/etc/telegraf/custom_scripts/show_firewall_input_filter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/etc/telegraf/custom_scripts/show_firewall_input_filter.py b/src/etc/telegraf/custom_scripts/show_firewall_input_filter.py
index cbc2bfe6b..d7eca5894 100755
--- a/src/etc/telegraf/custom_scripts/show_firewall_input_filter.py
+++ b/src/etc/telegraf/custom_scripts/show_firewall_input_filter.py
@@ -11,7 +11,10 @@ def get_nft_filter_chains():
"""
Get list of nft chains for table filter
"""
- nft = cmd('/usr/sbin/nft --json list table ip vyos_filter')
+ try:
+ nft = cmd('/usr/sbin/nft --json list table ip vyos_filter')
+ except Exception:
+ return []
nft = json.loads(nft)
chain_list = []