From f38da6ba4d8218f945c3e6ca6c08dcd5460024be Mon Sep 17 00:00:00 2001
From: sarthurdev <965089+sarthurdev@users.noreply.github.com>
Date: Tue, 30 Aug 2022 17:58:48 +0200
Subject: firewall: T4605: Rename filter tables to vyos_filter

---
 src/etc/telegraf/custom_scripts/show_firewall_input_filter.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/etc/telegraf')

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 '
-- 
cgit v1.2.3