diff options
| -rw-r--r-- | hosts/vidhar/prometheus/default.nix | 2 | ||||
| -rw-r--r-- | overlays/zte-prometheus-exporter/zte-prometheus-exporter.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index 005af680..1f26ba38 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix | |||
| @@ -468,7 +468,7 @@ in { | |||
| 468 | 468 | ||
| 469 | Type = "simple"; | 469 | Type = "simple"; |
| 470 | ExecStart = "${pkgs.zte-prometheus-exporter}/bin/zte-prometheus-exporter"; | 470 | ExecStart = "${pkgs.zte-prometheus-exporter}/bin/zte-prometheus-exporter"; |
| 471 | Environment = "ZTE_BASEURL=http://%I ZTE_HOSTNAME=localhost ZTE_PORT=9900"; | 471 | Environment = "ZTE_BASEURL=http://10.141.1.3 ZTE_HOSTNAME=localhost ZTE_PORT=9900"; |
| 472 | EnvironmentFile = config.sops.secrets."zte_dsl01.mgmt.yggdrasil".path; | 472 | EnvironmentFile = config.sops.secrets."zte_dsl01.mgmt.yggdrasil".path; |
| 473 | }; | 473 | }; |
| 474 | }; | 474 | }; |
diff --git a/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py b/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py index fc719a96..01d2b9fc 100644 --- a/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py +++ b/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py | |||
| @@ -54,7 +54,7 @@ class ZTEMetrics: | |||
| 54 | cls._instance.password = environ.get('ZTE_PASSWORD') | 54 | cls._instance.password = environ.get('ZTE_PASSWORD') |
| 55 | cls._instance.attrs = None | 55 | cls._instance.attrs = None |
| 56 | return cls._instance | 56 | return cls._instance |
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | def __init__(self): | 59 | def __init__(self): |
| 60 | raise RuntimeError('Call instance() instead') | 60 | raise RuntimeError('Call instance() instead') |
| @@ -203,7 +203,7 @@ class ZTEMetricsServer(BaseHTTPRequestHandler): | |||
| 203 | self.send_response(200) | 203 | self.send_response(200) |
| 204 | self.send_header("Content-type", "text/plain") | 204 | self.send_header("Content-type", "text/plain") |
| 205 | self.end_headers() | 205 | self.end_headers() |
| 206 | 206 | ||
| 207 | self.wfile.write(zte_metrics.prometheus()) | 207 | self.wfile.write(zte_metrics.prometheus()) |
| 208 | case _: | 208 | case _: |
| 209 | self.send_response(404) | 209 | self.send_response(404) |
