diff options
-rw-r--r-- | overlays/nftables-prometheus-exporter/nftables-prometheus-exporter.py | 8 |
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 | ||
120 | class NFTMetricsServer(BaseHTTPRequestHandler): | 120 | class 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() |