diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-08-30 17:58:48 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-09-13 11:59:12 +0200 |
commit | f38da6ba4d8218f945c3e6ca6c08dcd5460024be (patch) | |
tree | b3068ba443634cd227af1ca8cae370ed56741c79 /src/etc/telegraf/custom_scripts | |
parent | 31587975258a7ca8158ae6b7c490ac5e0ae4dd71 (diff) | |
download | vyos-1x-f38da6ba4d8218f945c3e6ca6c08dcd5460024be.tar.gz vyos-1x-f38da6ba4d8218f945c3e6ca6c08dcd5460024be.zip |
firewall: T4605: Rename filter tables to vyos_filter
Diffstat (limited to 'src/etc/telegraf/custom_scripts')
-rwxr-xr-x | src/etc/telegraf/custom_scripts/show_firewall_input_filter.py | 6 |
1 files changed, 3 insertions, 3 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 bf4bfd05d..cbc2bfe6b 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,7 @@ def get_nft_filter_chains(): """ Get list of nft chains for table filter """ - nft = cmd('/usr/sbin/nft --json list table ip filter') + nft = cmd('/usr/sbin/nft --json list table ip vyos_filter') nft = json.loads(nft) chain_list = [] @@ -27,7 +27,7 @@ def get_nftables_details(name): """ Get dict, counters packets and bytes for chain """ - command = f'/usr/sbin/nft list chain ip filter {name}' + command = f'/usr/sbin/nft list chain ip vyos_filter {name}' try: results = cmd(command) except: @@ -60,7 +60,7 @@ def get_nft_telegraf(name): Get data for telegraf in influxDB format """ for rule, rule_config in get_nftables_details(name).items(): - print(f'nftables,table=filter,chain={name},' + print(f'nftables,table=vyos_filter,chain={name},' f'ruleid={rule} ' f'pkts={rule_config["packets"]}i,' f'bytes={rule_config["bytes"]}i ' |