nixos/prometheus.exporters.unifi: drop

The corresponding package was dropped in 826bef9b51.
This commit is contained in:
Robert Schütz 2024-11-29 10:49:34 -08:00 committed by Pascal Bach
parent e3199efe35
commit 61f3a9680a
2 changed files with 0 additions and 72 deletions

View File

@ -89,7 +89,6 @@ let
"surfboard" "surfboard"
"systemd" "systemd"
"unbound" "unbound"
"unifi"
"unpoller" "unpoller"
"v2ray" "v2ray"
"varnish" "varnish"

View File

@ -1,71 +0,0 @@
{ config, lib, pkgs, options, ... }:
let
cfg = config.services.prometheus.exporters.unifi;
inherit (lib)
mkOption
types
escapeShellArg
optionalString
concatStringsSep
;
in
{
port = 9130;
extraOpts = {
unifiAddress = mkOption {
type = types.str;
example = "https://10.0.0.1:8443";
description = ''
URL of the UniFi Controller API.
'';
};
unifiInsecure = mkOption {
type = types.bool;
default = false;
description = ''
If enabled skip the verification of the TLS certificate of the UniFi Controller API.
Use with caution.
'';
};
unifiUsername = mkOption {
type = types.str;
example = "ReadOnlyUser";
description = ''
username for authentication against UniFi Controller API.
'';
};
unifiPassword = mkOption {
type = types.str;
description = ''
Password for authentication against UniFi Controller API.
'';
};
unifiTimeout = mkOption {
type = types.str;
default = "5s";
example = "2m";
description = ''
Timeout including unit for UniFi Controller API requests.
'';
};
};
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-unifi-exporter}/bin/unifi_exporter \
-telemetry.addr ${cfg.listenAddress}:${toString cfg.port} \
-unifi.addr ${cfg.unifiAddress} \
-unifi.username ${escapeShellArg cfg.unifiUsername} \
-unifi.password ${escapeShellArg cfg.unifiPassword} \
-unifi.timeout ${cfg.unifiTimeout} \
${optionalString cfg.unifiInsecure "-unifi.insecure" } \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}