summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py b/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py
index 7304d53d..a8ac966e 100644
--- a/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py
+++ b/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py
@@ -54,7 +54,7 @@ class NFTMetrics:
54 for query_name in ['ruleset', 'counters', 'maps', 'meters', 'sets']: 54 for query_name in ['ruleset', 'counters', 'maps', 'meters', 'sets']:
55 process = subprocess.run( 55 process = subprocess.run(
56 ('nft', '--json', 'list', query_name), 56 ('nft', '--json', 'list', query_name),
57 capture_output = True, check = True, text = True 57 stdout = subprocess.PIPE, check = True, text = True
58 ) 58 )
59 data = json.loads(process.stdout) 59 data = json.loads(process.stdout)
60 version = data['nftables'][0]['metainfo']['json_schema_version'] 60 version = data['nftables'][0]['metainfo']['json_schema_version']