0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/prometheus/exporters/knot: init

This commit is contained in:
Maximilian Bosch 2021-03-05 13:06:40 +01:00
parent bae2759a37
commit b4bd584b64
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
3 changed files with 69 additions and 0 deletions

View file

@ -248,6 +248,24 @@ let
'';
};
knot = {
exporterConfig = {
enable = true;
};
metricProvider = {
services.knot = {
enable = true;
extraArgs = [ "-v" ];
};
};
exporterTest = ''
wait_for_unit("knot.service")
wait_for_unit("prometheus-knot-exporter.service")
wait_for_open_port(9433)
succeed("curl -sSf 'localhost:9433' | grep -q 'knot_server_zone_count 0.0'")
'';
};
keylight = {
# A hardware device is required to properly test this exporter, so just
# perform a couple of basic sanity checks that the exporter is running