diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 8123f2ca52e9..27839938a98d 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -564,6 +564,8 @@ - The `services.prometheus.exporters.minio` option has been removed, as it's upstream implementation was broken and unmaintained. Minio now has built-in [Prometheus metrics exposure](https://min.io/docs/minio/linux/operations/monitoring/collect-minio-metrics-using-prometheus.html), which can be used instead. +- The `services.prometheus.exporters.tor` option has been removed, as its upstream implementation was broken and unmaintained. + - The `services.patroni.raft` option has been removed, as Raft has been [deprecated by upstream since 3.0.0](https://github.com/patroni/patroni/blob/master/docs/releases.rst#version-300) - `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments. diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index cf840a2d4514..c388a7aa5558 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -88,7 +88,6 @@ let "statsd" "surfboard" "systemd" - "tor" "unbound" "unifi" "unpoller" @@ -299,6 +298,9 @@ in The Minio exporter has been removed, as it was broken and unmaintained. See the 24.11 release notes for more information. '') + (lib.mkRemovedOptionModule [ "tor" ] '' + The Tor exporter has been removed, as it was broken and unmaintained. + '') ]; }; description = "Prometheus exporter configuration"; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/tor.nix b/nixos/modules/services/monitoring/prometheus/exporters/tor.nix deleted file mode 100644 index d39112d0c283..000000000000 --- a/nixos/modules/services/monitoring/prometheus/exporters/tor.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, pkgs, options, ... }: - -let - cfg = config.services.prometheus.exporters.tor; - inherit (lib) mkOption types concatStringsSep; -in -{ - port = 9130; - extraOpts = { - torControlAddress = mkOption { - type = types.str; - default = "127.0.0.1"; - description = '' - Tor control IP address or hostname. - ''; - }; - - torControlPort = mkOption { - type = types.port; - default = 9051; - description = '' - Tor control port. - ''; - }; - }; - serviceOpts = { - serviceConfig = { - ExecStart = '' - ${pkgs.prometheus-tor-exporter}/bin/prometheus-tor-exporter \ - -b ${cfg.listenAddress} \ - -p ${toString cfg.port} \ - -a ${cfg.torControlAddress} \ - -c ${toString cfg.torControlPort} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - }; - - # CPython requires a process to either have $HOME defined or run as a UID - # defined in /etc/passwd. The latter is false with DynamicUser, so define a - # dummy $HOME. https://bugs.python.org/issue10496 - environment = { HOME = "/var/empty"; }; - }; -} diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 71eef72df6f3..6ad1bc654084 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1511,25 +1511,6 @@ let ''; }; - tor = { - exporterConfig = { - enable = true; - }; - metricProvider = { - # Note: this does not connect the test environment to the Tor network. - # Client, relay, bridge or exit connectivity are disabled by default. - services.tor.enable = true; - services.tor.settings.ControlPort = 9051; - }; - exporterTest = '' - wait_for_unit("tor.service") - wait_for_open_port(9051) - wait_for_unit("prometheus-tor-exporter.service") - wait_for_open_port(9130) - succeed("curl -sSf localhost:9130/metrics | grep 'tor_version{.\\+} 1'") - ''; - }; - unpoller = { nodeName = "unpoller"; exporterConfig.enable = true; diff --git a/pkgs/servers/monitoring/prometheus/tor-exporter.nix b/pkgs/servers/monitoring/prometheus/tor-exporter.nix deleted file mode 100644 index c12e92c5ee56..000000000000 --- a/pkgs/servers/monitoring/prometheus/tor-exporter.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, fetchFromGitHub, python3Packages, nixosTests }: - -python3Packages.buildPythonApplication rec { - pname = "tor-exporter"; - version = "0.4"; - - # Just a single .py file to use as the application's main entry point. - format = "other"; - - src = fetchFromGitHub { - rev = "v${version}"; - owner = "atx"; - repo = "prometheus-tor_exporter"; - sha256 = "1gzf42z0cgdqijbi9cwpjkqzkvnabaxkkfa5ac5h27r3pxx3q4n0"; - }; - - propagatedBuildInputs = with python3Packages; [ prometheus-client stem retrying ]; - - installPhase = '' - mkdir -p $out/share/ - cp prometheus-tor-exporter.py $out/share/ - ''; - - fixupPhase = '' - makeWrapper "${python3Packages.python.interpreter}" "$out/bin/prometheus-tor-exporter" \ - --set PYTHONPATH "$PYTHONPATH" \ - --add-flags "$out/share/prometheus-tor-exporter.py" - ''; - - passthru.tests = { inherit (nixosTests.prometheus-exporters) tor; }; - - meta = with lib; { - description = "Prometheus exporter that exposes metrics from a Tor daemon"; - mainProgram = "prometheus-tor-exporter"; - homepage = "https://github.com/atx/prometheus-tor_exporter"; - license = licenses.mit; - maintainers = with maintainers; [ Scrumplex ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index ac1e02b3ce72..64aeb521b9be 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -962,6 +962,7 @@ mapAliases { prometheus-dovecot-exporter = dovecot_exporter; # Added 2024-06-10 prometheus-openldap-exporter = throw "'prometheus-openldap-exporter' has been removed from nixpkgs, as it was unmaintained"; # Added 2024-09-01 prometheus-minio-exporter = throw "'prometheus-minio-exporter' has been removed from nixpkgs, use Minio's built-in Prometheus integration instead"; # Added 2024-06-10 + prometheus-tor-exporter = throw "'prometheus-tor-exporter' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-10-30 protobuf3_24 = protobuf_24; protobuf3_23 = protobuf_23; protobuf3_21 = protobuf_21; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92bc0ac82acb..efe8f7a1be31 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24877,7 +24877,6 @@ with pkgs; prometheus-surfboard-exporter = callPackage ../servers/monitoring/prometheus/surfboard-exporter.nix { }; prometheus-sql-exporter = callPackage ../servers/monitoring/prometheus/sql-exporter.nix { }; prometheus-systemd-exporter = callPackage ../servers/monitoring/prometheus/systemd-exporter.nix { }; - prometheus-tor-exporter = callPackage ../servers/monitoring/prometheus/tor-exporter.nix { }; prometheus-unbound-exporter = callPackage ../servers/monitoring/prometheus/unbound-exporter.nix { }; prometheus-v2ray-exporter = callPackage ../servers/monitoring/prometheus/v2ray-exporter.nix { }; prometheus-varnish-exporter = callPackage ../servers/monitoring/prometheus/varnish-exporter.nix { };