summaryrefslogtreecommitdiff
path: root/overlays/nftables-prometheus-exporter
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-01-01 17:02:28 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-01-01 17:02:28 +0100
commit187a0aec7641af4be3eb4e9cb4a781883819efd4 (patch)
tree414040f4adb1b3372cd78412b2577d15678a746b /overlays/nftables-prometheus-exporter
parenta795521d96a28564d0826d717d5e281f405e3889 (diff)
downloadnixos-187a0aec7641af4be3eb4e9cb4a781883819efd4.tar
nixos-187a0aec7641af4be3eb4e9cb4a781883819efd4.tar.gz
nixos-187a0aec7641af4be3eb4e9cb4a781883819efd4.tar.bz2
nixos-187a0aec7641af4be3eb4e9cb4a781883819efd4.tar.xz
nixos-187a0aec7641af4be3eb4e9cb4a781883819efd4.zip
...
Diffstat (limited to 'overlays/nftables-prometheus-exporter')
-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']