prometheus-kea-exporter: 0.7.0 -> 0.7.1 (#539389)
This commit is contained in:
@@ -110,6 +110,13 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.exporters.kea = {
|
||||
enable = true;
|
||||
controlSocketPaths = [
|
||||
config.services.kea.dhcp4.settings.control-socket.socket-name
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nameserver =
|
||||
@@ -217,5 +224,9 @@
|
||||
|
||||
with subtest("DDNS"):
|
||||
nameserver.wait_until_succeeds("kdig +short client.lan.nixos.test @10.0.0.2 | grep -q 10.0.0.3")
|
||||
|
||||
with subtest("Prometheus Exporter"):
|
||||
router.log(router.execute("curl 127.0.0.1:9547")[1])
|
||||
router.succeed("curl --silent 127.0.0.1:9547 | grep -qE '^kea_dhcp4_addresses_assigned_total.*1.0$'")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
nixosTests,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "kea-exporter";
|
||||
version = "0.7.0";
|
||||
version = "0.7.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "kea_exporter";
|
||||
inherit version;
|
||||
hash = "sha256-kn2iwYWcyW90tgfWmzLF7rU06fJyLRzqYKNLOgu/Yqk=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mweinelt";
|
||||
repo = "kea-exporter";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-UwQYR01cBdPEUBhOo5TqwmptAvJpxln1OLU2boAFdn4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
@@ -26,21 +28,17 @@ python3Packages.buildPythonApplication rec {
|
||||
requests
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
$out/bin/kea-exporter --help > /dev/null
|
||||
$out/bin/kea-exporter --version | grep -q ${version}
|
||||
'';
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) kea;
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/mweinelt/kea-exporter/blob/v${version}/HISTORY";
|
||||
changelog = "https://github.com/mweinelt/kea-exporter/blob/v${finalAttrs.version}/HISTORY";
|
||||
description = "Export Kea Metrics in the Prometheus Exposition Format";
|
||||
mainProgram = "kea-exporter";
|
||||
homepage = "https://github.com/mweinelt/kea-exporter";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user