summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-10-13 13:09:39 +0200
committerGitHub <noreply@github.com>2022-10-13 13:09:39 +0200
commit02f2535dda08c6e19ba2e1fdb750f1e298b45add (patch)
tree3473c3398de4e22bf5337b770aec42758bd59f1a /src/conf_mode
parent21994436114026d2b9ed991880f5636c3db10986 (diff)
parent33bf84e66677ea43cc26ae1ebd8b37e6c14ebbb7 (diff)
downloadvyos-1x-02f2535dda08c6e19ba2e1fdb750f1e298b45add.tar.gz
vyos-1x-02f2535dda08c6e19ba2e1fdb750f1e298b45add.zip
Merge pull request #1592 from sever-sever/T4746
monitoring: T4746: Add exception if we do not have firewall rules
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/service_monitoring_telegraf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/conf_mode/service_monitoring_telegraf.py b/src/conf_mode/service_monitoring_telegraf.py
index 427cb6911..aafece47a 100755
--- a/src/conf_mode/service_monitoring_telegraf.py
+++ b/src/conf_mode/service_monitoring_telegraf.py
@@ -42,7 +42,11 @@ systemd_override = '/etc/systemd/system/telegraf.service.d/10-override.conf'
def get_nft_filter_chains():
""" Get nft chains for table filter """
- nft = cmd('nft --json list table ip vyos_filter')
+ try:
+ nft = cmd('nft --json list table ip vyos_filter')
+ except Exception:
+ print('nft table ip vyos_filter not found')
+ return []
nft = json.loads(nft)
chain_list = []