prometheus-kea-exporter: 0.6.1 -> 0.7.0
https://github.com/mweinelt/kea-exporter/blob/v0.7.0/HISTORY Updates the module to use the target name, because it now supports both UDS as well as HTTP URLs.
This commit is contained in:
parent
d702c91302
commit
c77d192eb4
|
@ -1,7 +1,7 @@
|
||||||
{ config
|
{ config
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
, options
|
, utils
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -10,18 +10,22 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.prometheus.exporters.kea;
|
cfg = config.services.prometheus.exporters.kea;
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule [ "controlSocketPaths" ] [ "targets" ])
|
||||||
|
];
|
||||||
port = 9547;
|
port = 9547;
|
||||||
extraOpts = {
|
extraOpts = {
|
||||||
controlSocketPaths = mkOption {
|
targets = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[
|
[
|
||||||
"/run/kea/kea-dhcp4.socket"
|
"/run/kea/kea-dhcp4.socket"
|
||||||
"/run/kea/kea-dhcp6.socket"
|
"/run/kea/kea-dhcp6.socket"
|
||||||
|
"http://127.0.0.1:8547"
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Paths to kea control sockets
|
Paths or URLs to the Kea control socket.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -33,12 +37,11 @@ in {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "kea";
|
User = "kea";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
ExecStart = ''
|
ExecStart = utils.escapeSystemdExecArgs ([
|
||||||
${pkgs.prometheus-kea-exporter}/bin/kea-exporter \
|
(lib.getExe pkgs.prometheus-kea-exporter)
|
||||||
--address ${cfg.listenAddress} \
|
"--address" cfg.listenAddress
|
||||||
--port ${toString cfg.port} \
|
"--port" cfg.port
|
||||||
${concatStringsSep " " cfg.controlSocketPaths}
|
] ++ cfg.extraFlags ++ cfg.targets);
|
||||||
'';
|
|
||||||
RuntimeDirectory = "kea";
|
RuntimeDirectory = "kea";
|
||||||
RuntimeDirectoryPreserve = true;
|
RuntimeDirectoryPreserve = true;
|
||||||
RestrictAddressFamilies = [
|
RestrictAddressFamilies = [
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "kea-exporter";
|
pname = "kea-exporter";
|
||||||
version = "0.6.1";
|
version = "0.7.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
pname = "kea_exporter";
|
pname = "kea_exporter";
|
||||||
inherit version;
|
inherit version;
|
||||||
hash = "sha256-PyNFSTDqT+PBY7d9NSG1FVhN+Y3ID13T6859kBYsFzU=";
|
hash = "sha256-kn2iwYWcyW90tgfWmzLF7rU06fJyLRzqYKNLOgu/Yqk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with python3Packages; [
|
nativeBuildInputs = with python3Packages; [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user