summaryrefslogtreecommitdiff
path: root/overlays
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-01-01 16:55:40 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-01-01 16:55:40 +0100
commit1e50023af2505e7a5fbad350d0c8a666e78d4fb9 (patch)
treea8f3f0689bd89c192559dcbf2fa987e0918908d2 /overlays
parentcb8dd904c6fea0fd8a5b3bfcd776d0173b147618 (diff)
downloadnixos-1e50023af2505e7a5fbad350d0c8a666e78d4fb9.tar
nixos-1e50023af2505e7a5fbad350d0c8a666e78d4fb9.tar.gz
nixos-1e50023af2505e7a5fbad350d0c8a666e78d4fb9.tar.bz2
nixos-1e50023af2505e7a5fbad350d0c8a666e78d4fb9.tar.xz
nixos-1e50023af2505e7a5fbad350d0c8a666e78d4fb9.zip
...
Diffstat (limited to 'overlays')
-rw-r--r--overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py b/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py
index c5c5139d..7304d53d 100644
--- a/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py
+++ b/overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py
@@ -119,8 +119,8 @@ class NFTMetrics:
119 119
120class NFTMetricsServer(BaseHTTPRequestHandler): 120class NFTMetricsServer(BaseHTTPRequestHandler):
121 def do_GET(self): 121 def do_GET(self):
122 zte_metrics = NFTMetrics.instance() 122 nft_metrics = NFTMetrics.instance()
123 zte_metrics.update() 123 nft_metrics.update()
124 124
125 url = urlparse(self.path) 125 url = urlparse(self.path)
126 126
@@ -130,13 +130,13 @@ class NFTMetricsServer(BaseHTTPRequestHandler):
130 self.send_header("Content-type", "application/json") 130 self.send_header("Content-type", "application/json")
131 self.end_headers() 131 self.end_headers()
132 132
133 self.wfile.write(zte_metrics.json_text().encode('utf-8')) 133 self.wfile.write(nft_metrics.json_text().encode('utf-8'))
134 case '/metrics': 134 case '/metrics':
135 self.send_response(200) 135 self.send_response(200)
136 self.send_header("Content-type", "text/plain") 136 self.send_header("Content-type", "text/plain")
137 self.end_headers() 137 self.end_headers()
138 138
139 self.wfile.write(zte_metrics.prometheus()) 139 self.wfile.write(nft_metrics.prometheus())
140 case _: 140 case _:
141 self.send_response(404) 141 self.send_response(404)
142 self.end_headers() 142 self.end_headers()