Merge pull request #13578 from Baughn/prometheus
Prometheus: Misc updates
This commit is contained in:
@@ -2651,33 +2651,35 @@ let
|
|||||||
propagatedBuildInputs = [ kr.text ];
|
propagatedBuildInputs = [ kr.text ];
|
||||||
};
|
};
|
||||||
|
|
||||||
prometheus.alertmanager = buildGoPackage rec {
|
prometheus.alertmanager = buildFromGitHub rec {
|
||||||
name = "prometheus-alertmanager-${rev}";
|
rev = "0.1.0";
|
||||||
rev = "0.0.4";
|
owner = "prometheus";
|
||||||
goPackagePath = "github.com/prometheus/alertmanager";
|
repo = "alertmanager";
|
||||||
|
sha256 = "1ya465bns6cj2lqbipmfm13wz8kxii5h9mm7lc0ba1xv26xx5zs7";
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "prometheus";
|
|
||||||
repo = "alertmanager";
|
|
||||||
inherit rev;
|
|
||||||
sha256 = "0g656rzal7m284mihqdrw23vhs7yr65ax19nvi70jl51wdallv15";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
fsnotify.v0
|
# fsnotify.v0
|
||||||
httprouter
|
# httprouter
|
||||||
prometheus.client_golang
|
# prometheus.client_golang
|
||||||
prometheus.log
|
# prometheus.log
|
||||||
pushover
|
# pushover
|
||||||
];
|
];
|
||||||
|
|
||||||
buildFlagsArray = ''
|
# Tests exist, but seem to clash with the firewall.
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
export GO15VENDOREXPERIMENT=1
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildFlagsArray = let t = "github.com/${owner}/${repo}/version"; in ''
|
||||||
-ldflags=
|
-ldflags=
|
||||||
-X main.buildVersion=${rev}
|
-X ${t}.Version=${rev}
|
||||||
-X main.buildBranch=master
|
-X ${t}.Revision=unknown
|
||||||
-X main.buildUser=nix@nixpkgs
|
-X ${t}.Branch=unknown
|
||||||
-X main.buildDate=20150101-00:00:00
|
-X ${t}.BuildUser=nix@nixpkgs
|
||||||
-X main.goVersion=${stdenv.lib.getVersion go}
|
-X ${t}.BuildDate=unknown
|
||||||
|
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@@ -2819,10 +2821,10 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
prometheus.node-exporter = buildFromGitHub {
|
prometheus.node-exporter = buildFromGitHub {
|
||||||
rev = "0.10.0";
|
rev = "0.11.0";
|
||||||
owner = "prometheus";
|
owner = "prometheus";
|
||||||
repo = "node_exporter";
|
repo = "node_exporter";
|
||||||
sha256 = "0dmczav52v9vi0kxl8gd2s7x7c94g0vzazhyvlq1h3729is2nf0p";
|
sha256 = "149fs9yxnbiyd4ww7bxsv730mcskblpzb3cs4v12jnq2v84a4kk4";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
go-runit
|
go-runit
|
||||||
@@ -2833,6 +2835,8 @@ let
|
|||||||
protobuf
|
protobuf
|
||||||
];
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Prometheus exporter for machine metrics";
|
description = "Prometheus exporter for machine metrics";
|
||||||
homepage = https://github.com/prometheus/node_exporter;
|
homepage = https://github.com/prometheus/node_exporter;
|
||||||
@@ -2871,51 +2875,48 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
prometheus.prometheus = buildGoPackage rec {
|
prometheus.prometheus = buildFromGitHub rec {
|
||||||
name = "prometheus-${version}";
|
rev = "0.17.0";
|
||||||
version = "0.15.1";
|
owner = "prometheus";
|
||||||
goPackagePath = "github.com/prometheus/prometheus";
|
repo = "prometheus";
|
||||||
rev = "64349aade284846cb194be184b1b180fca629a7c";
|
sha256 = "176198krna2i37dfhwsqi7m36sqn175yiny6n52vj27mc9s8ggzx";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
inherit rev;
|
|
||||||
owner = "prometheus";
|
|
||||||
repo = "prometheus";
|
|
||||||
sha256 = "0gljpwnlip1fnmhbc96hji2rc56xncy97qccm7v1z5j1nhc5fam2";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
consul
|
# consul
|
||||||
dns
|
# dns
|
||||||
fsnotify.v1
|
# fsnotify.v1
|
||||||
go-zookeeper
|
# go-zookeeper
|
||||||
goleveldb
|
# goleveldb
|
||||||
httprouter
|
# httprouter
|
||||||
logrus
|
# logrus
|
||||||
net
|
# net
|
||||||
prometheus.client_golang
|
# prometheus.client_golang
|
||||||
prometheus.log
|
# prometheus.log
|
||||||
yaml-v2
|
# yaml-v2
|
||||||
];
|
];
|
||||||
|
|
||||||
|
docheck = true;
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
export GO15VENDOREXPERIMENT=1
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildFlagsArray = let t = "github.com/${owner}/${repo}/version"; in ''
|
||||||
|
-ldflags=
|
||||||
|
-X ${t}.Version=${rev}
|
||||||
|
-X ${t}.Revision=unknown
|
||||||
|
-X ${t}.Branch=unknown
|
||||||
|
-X ${t}.BuildUser=nix@nixpkgs
|
||||||
|
-X ${t}.BuildDate=unknown
|
||||||
|
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
|
||||||
|
'';
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus"
|
mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus"
|
||||||
cp -a $src/documentation/* $bin/share/doc/prometheus
|
cp -a $src/documentation/* $bin/share/doc/prometheus
|
||||||
cp -a $src/console_libraries $src/consoles $bin/etc/prometheus
|
cp -a $src/console_libraries $src/consoles $bin/etc/prometheus
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Metadata that gets embedded into the binary
|
|
||||||
buildFlagsArray = let t = "${goPackagePath}/version"; in
|
|
||||||
''
|
|
||||||
-ldflags=
|
|
||||||
-X ${t}.Version=${version}
|
|
||||||
-X ${t}.Revision=${builtins.substring 0 6 rev}
|
|
||||||
-X ${t}.Branch=master
|
|
||||||
-X ${t}.BuildUser=nix@nixpkgs
|
|
||||||
-X ${t}.BuildDate=20150101-00:00:00
|
|
||||||
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Service monitoring system and time series database";
|
description = "Service monitoring system and time series database";
|
||||||
homepage = http://prometheus.io;
|
homepage = http://prometheus.io;
|
||||||
|
|||||||
Reference in New Issue
Block a user