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:
Maximilian Bosch 2019-08-12 19:38:43 +02:00 committed by GitHub
commit f0d6955052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -4,6 +4,13 @@ with lib;
let
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
{
port = 9115;
@ -21,7 +28,7 @@ in
ExecStart = ''
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--config.file ${cfg.configFile} \
--config.file ${checkConfig cfg.configFile} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";

View File

@ -2,7 +2,7 @@
buildGoPackage rec {
name = "blackbox_exporter-${version}";
version = "0.12.0";
version = "0.14.0";
rev = version;
goPackagePath = "github.com/prometheus/blackbox_exporter";
@ -11,14 +11,16 @@ buildGoPackage rec {
rev = "v${version}";
owner = "prometheus";
repo = "blackbox_exporter";
sha256 = "0gd3vymk3qdfjnf0rx9kwc6v0jv7f8l30igvj2v7bljar2d6hzxf";
sha256 = "1v5n59p9jl6y1ka9mqp0ibx1kpcb3gbpl0i6bhqpbr154frmqm4x";
};
doCheck = true;
meta = with stdenv.lib; {
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;
maintainers = with maintainers; [ globin fpletz ];
maintainers = with maintainers; [ globin fpletz willibutz ];
platforms = platforms.unix;
};
}