Merge pull request #66470 from WilliButz/update-blackbox-exporter
prometheus-blackbox-exporter: 0.12.0 -> 0.14.0, run tests and check config
This commit is contained in:
commit
f0d6955052
@ -4,6 +4,13 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.prometheus.exporters.blackbox;
|
cfg = config.services.prometheus.exporters.blackbox;
|
||||||
|
|
||||||
|
checkConfig = file: pkgs.runCommand "checked-blackbox-exporter.conf" {
|
||||||
|
preferLocalBuild = true;
|
||||||
|
buildInputs = [ pkgs.buildPackages.prometheus-blackbox-exporter ]; } ''
|
||||||
|
ln -s ${file} $out
|
||||||
|
blackbox_exporter --config.check --config.file $out
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
port = 9115;
|
port = 9115;
|
||||||
@ -21,7 +28,7 @@ in
|
|||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
|
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
|
||||||
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
||||||
--config.file ${cfg.configFile} \
|
--config.file ${checkConfig cfg.configFile} \
|
||||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||||
'';
|
'';
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "blackbox_exporter-${version}";
|
name = "blackbox_exporter-${version}";
|
||||||
version = "0.12.0";
|
version = "0.14.0";
|
||||||
rev = version;
|
rev = version;
|
||||||
|
|
||||||
goPackagePath = "github.com/prometheus/blackbox_exporter";
|
goPackagePath = "github.com/prometheus/blackbox_exporter";
|
||||||
@ -11,14 +11,16 @@ buildGoPackage rec {
|
|||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
owner = "prometheus";
|
owner = "prometheus";
|
||||||
repo = "blackbox_exporter";
|
repo = "blackbox_exporter";
|
||||||
sha256 = "0gd3vymk3qdfjnf0rx9kwc6v0jv7f8l30igvj2v7bljar2d6hzxf";
|
sha256 = "1v5n59p9jl6y1ka9mqp0ibx1kpcb3gbpl0i6bhqpbr154frmqm4x";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP";
|
description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP";
|
||||||
homepage = https://github.com/prometheus/blackbox_exporter;
|
homepage = "https://github.com/prometheus/blackbox_exporter";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ globin fpletz ];
|
maintainers = with maintainers; [ globin fpletz willibutz ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user