prometheus-bind-exporter: 0.7.0 -> 0.8.0, bind: add json_c support (#489588)

This commit is contained in:
Sandro 2026-06-20 16:40:53 +00:00 committed by GitHub
commit 85881708dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 8 deletions

View file

@ -17,7 +17,7 @@ in
type = types.str;
default = "http://localhost:8053/";
description = ''
HTTP XML API address of an Bind server.
HTTP API address of a BIND server.
'';
};
bindTimeout = mkOption {
@ -29,13 +29,14 @@ in
};
bindVersion = mkOption {
type = types.enum [
"xml.v2"
"json"
"xml"
"xml.v3"
"auto"
];
default = "auto";
default = "json";
description = ''
BIND statistics version. Can be detected automatically.
BIND statistics version. Defaults to JSON.
'';
};
bindGroups = mkOption {

View file

@ -111,7 +111,7 @@ let
wait_for_unit("prometheus-bind-exporter.service")
wait_for_open_port(9119)
succeed(
"curl -sSf http://localhost:9119/metrics | grep 'bind_query_recursions_total 0'"
"curl -sSf http://localhost:9119/metrics | grep 'bind_up 1'"
)
'';
};

View file

@ -9,6 +9,7 @@
libidn2,
libtool,
libxml2,
json_c,
openssl,
liburcu,
libuv,
@ -59,6 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
libidn2
libtool
libxml2
json_c
openssl
liburcu
libuv

View file

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "bind_exporter";
version = "0.7.0";
version = "0.8.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "prometheus-community";
repo = "bind_exporter";
sha256 = "sha256-x/XGatlXCKo9cI92JzFItApsjuZAfZX+8IZRpy7PVUo=";
sha256 = "sha256-r1P+zy3iMgPmfvIBgycW8KS0gfNOxCT9YMmHdeY4uXA=";
};
vendorHash = "sha256-f0ei/zotOj5ebURAOWUox/7J3jS2abQ5UgjninI9nRk=";
vendorHash = "sha256-/fPj5LOe3QdnVPdtYdaqtnGMJ7/SZ458mpvjwO8TxEI=";
passthru.tests = { inherit (nixosTests.prometheus-exporters) bind; };