0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #276177 from aaronjheng/prometheus-openvpn-exporter

prometheus-openvpn-exporter: remove
This commit is contained in:
Mario Rodas 2024-01-30 19:32:50 -05:00 committed by GitHub
commit 4006079f95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1 additions and 89 deletions

View file

@ -60,7 +60,6 @@ let
"node"
"nut"
"openldap"
"openvpn"
"pgbouncer"
"php-fpm"
"pihole"

View file

@ -1,39 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.prometheus.exporters.openvpn;
in {
port = 9176;
extraOpts = {
statusPaths = mkOption {
type = types.listOf types.str;
description = lib.mdDoc ''
Paths to OpenVPN status files. Please configure the OpenVPN option
`status` accordingly.
'';
};
telemetryPath = mkOption {
type = types.str;
default = "/metrics";
description = lib.mdDoc ''
Path under which to expose metrics.
'';
};
};
serviceOpts = {
serviceConfig = {
PrivateDevices = true;
ProtectKernelModules = true;
NoNewPrivileges = true;
ExecStart = ''
${pkgs.prometheus-openvpn-exporter}/bin/openvpn_exporter \
-openvpn.status_paths "${concatStringsSep "," cfg.statusPaths}" \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
-web.telemetry-path ${cfg.telemetryPath}
'';
};
};
}