diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-10-13 13:09:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 13:09:39 +0200 |
commit | 02f2535dda08c6e19ba2e1fdb750f1e298b45add (patch) | |
tree | 3473c3398de4e22bf5337b770aec42758bd59f1a /src/etc | |
parent | 21994436114026d2b9ed991880f5636c3db10986 (diff) | |
parent | 33bf84e66677ea43cc26ae1ebd8b37e6c14ebbb7 (diff) | |
download | vyos-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/etc')
-rwxr-xr-x | src/etc/telegraf/custom_scripts/show_firewall_input_filter.py | 5 |
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 = [] |