diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index 0eb3038..d5ceb4b 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -750,7 +750,6 @@ class NixConfigurator(ConfiguratorBase): nix_eval_max_memory_size: int, nix_workers_secret_name: str = "buildbot-nix-workers", outputs_path: str | None = None, - prometheus_exporter_port: int | None = None, ) -> None: super().__init__() self.nix_workers_secret_name = nix_workers_secret_name @@ -764,7 +763,6 @@ class NixConfigurator(ConfiguratorBase): self.outputs_path = None else: self.outputs_path = Path(outputs_path) - self.prometheus_exporter_port = prometheus_exporter_port def configure(self, config: dict[str, Any]) -> None: projects = load_projects(self.github.token(), self.github.project_cache_file) @@ -841,10 +839,6 @@ class NixConfigurator(ConfiguratorBase): context=Interpolate("buildbot/%(prop:status_name)s"), ) ) - if self.prometheus_exporter_port: - config["services"].append( - reporters.Prometheus(port=self.prometheus_exporter_port) - ) systemd_secrets = secrets.SecretInAFile( dirname=os.environ["CREDENTIALS_DIRECTORY"] diff --git a/nix/master.nix b/nix/master.nix index 143d2ee..b55dc55 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -95,12 +95,6 @@ in default = null; example = "/var/www/buildbot/nix-outputs"; }; - - prometheusExporterPort = lib.mkOption { - type = lib.types.nullOr lib.types.port; - default = null; - description = "Port where metrics will be served"; - }; }; }; config = lib.mkIf cfg.enable { @@ -143,7 +137,6 @@ in nix_eval_worker_count=${builtins.toJSON cfg.evalWorkerCount}, nix_supported_systems=${builtins.toJSON cfg.buildSystems}, outputs_path=${if cfg.outputsPath == null then "None" else builtins.toJSON cfg.outputsPath}, - prometheus_exporter_port=${if cfg.prometheusExporterPort == null then "None" else builtins.toJSON cfg.prometheusExporterPort}, ) '' ]; @@ -161,19 +154,7 @@ in (ps.toPythonModule pkgs.buildbot-worker) pkgs.buildbot-plugins.www-react (pkgs.python3.pkgs.callPackage ../default.nix { }) - ] ++ lib.optional (cfg.prometheusExporterPort != null) - (ps.buildPythonPackage rec { - pname = "buildbot-prometheus"; - version = "0c81a89bbe34628362652fbea416610e215b5d1e"; - src = pkgs.fetchFromGitHub { - owner = "claws"; - repo = "buildbot-prometheus"; - rev = version; - hash = "sha256-bz2Nv2RZ44i1VoPvQ/XjGMfTT6TmW6jhEVwItPk23SM="; - }; - propagatedBuildInputs = [ ps.prometheus-client ]; - doCheck = false; - }); + ]; }; systemd.services.buildbot-master = {