nixos/prometheus: remove tor exporter
This commit is contained in:
parent
990f185651
commit
93cce0becc
@ -564,6 +564,8 @@
|
|||||||
- The `services.prometheus.exporters.minio` option has been removed, as it's upstream implementation was broken and unmaintained.
|
- 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.
|
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)
|
- 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.
|
- `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments.
|
||||||
|
@ -88,7 +88,6 @@ let
|
|||||||
"statsd"
|
"statsd"
|
||||||
"surfboard"
|
"surfboard"
|
||||||
"systemd"
|
"systemd"
|
||||||
"tor"
|
|
||||||
"unbound"
|
"unbound"
|
||||||
"unifi"
|
"unifi"
|
||||||
"unpoller"
|
"unpoller"
|
||||||
@ -299,6 +298,9 @@ in
|
|||||||
The Minio exporter has been removed, as it was broken and unmaintained.
|
The Minio exporter has been removed, as it was broken and unmaintained.
|
||||||
See the 24.11 release notes for more information.
|
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";
|
description = "Prometheus exporter configuration";
|
||||||
|
@ -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"; };
|
|
||||||
};
|
|
||||||
}
|
|
@ -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 = {
|
unpoller = {
|
||||||
nodeName = "unpoller";
|
nodeName = "unpoller";
|
||||||
exporterConfig.enable = true;
|
exporterConfig.enable = true;
|
||||||
|
@ -27,8 +27,6 @@ python3Packages.buildPythonApplication rec {
|
|||||||
--add-flags "$out/share/prometheus-tor-exporter.py"
|
--add-flags "$out/share/prometheus-tor-exporter.py"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = { inherit (nixosTests.prometheus-exporters) tor; };
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Prometheus exporter that exposes metrics from a Tor daemon";
|
description = "Prometheus exporter that exposes metrics from a Tor daemon";
|
||||||
mainProgram = "prometheus-tor-exporter";
|
mainProgram = "prometheus-tor-exporter";
|
||||||
|
Loading…
Reference in New Issue
Block a user