mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
New package: prometheus-alertmanager
This commit is contained in:
parent
9c1f0b33a3
commit
92b08cd406
56
pkgs/servers/monitoring/prometheus/alertmanager/default.nix
Normal file
56
pkgs/servers/monitoring/prometheus/alertmanager/default.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{ stdenv, lib, goPackages, fetchFromGitHub, protobuf, vim }:
|
||||||
|
|
||||||
|
with goPackages;
|
||||||
|
|
||||||
|
buildGoPackage rec {
|
||||||
|
name = "prometheus-alertmanager-${version}";
|
||||||
|
version = "0.1.0";
|
||||||
|
goPackagePath = "github.com/prometheus/alertmanager";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "prometheus";
|
||||||
|
repo = "alertmanager";
|
||||||
|
rev = "942cd35dea6dc406b106d7a57ffe7adbb3b978a5";
|
||||||
|
sha256 = "1c14vgn9s0dn322ss8fs5b47blw1g8cxy9w4yjn0f7x2sdwplx1i";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
goPackages.glog
|
||||||
|
goPackages.protobuf
|
||||||
|
goPackages.fsnotify
|
||||||
|
goPackages.httprouter
|
||||||
|
goPackages.prometheus.client_golang
|
||||||
|
goPackages.pushover
|
||||||
|
protobuf
|
||||||
|
vim
|
||||||
|
];
|
||||||
|
|
||||||
|
buildFlagsArray = ''
|
||||||
|
-ldflags=
|
||||||
|
-X main.buildVersion ${version}
|
||||||
|
-X main.buildBranch master
|
||||||
|
-X main.buildUser nix@nixpkgs
|
||||||
|
-X main.buildDate 20150101-00:00:00
|
||||||
|
-X main.goVersion ${lib.getVersion go}
|
||||||
|
'';
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
(
|
||||||
|
cd "go/src/$goPackagePath"
|
||||||
|
protoc --proto_path=./config \
|
||||||
|
--go_out=./config/generated/ \
|
||||||
|
./config/config.proto
|
||||||
|
cd web
|
||||||
|
${stdenv.shell} blob/embed-static.sh static templates \
|
||||||
|
| gofmt > blob/files.go
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Alerting dispather for the Prometheus monitoring system";
|
||||||
|
homepage = "https://github.com/prometheus/alertmanager";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ benley ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
@ -8383,6 +8383,8 @@ let
|
|||||||
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
|
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
|
||||||
|
|
||||||
prometheus = callPackage ../servers/monitoring/prometheus { };
|
prometheus = callPackage ../servers/monitoring/prometheus { };
|
||||||
|
prometheus-alertmanager =
|
||||||
|
callPackage ../servers/monitoring/prometheus/alertmanager { };
|
||||||
|
|
||||||
psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { };
|
psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { };
|
||||||
|
|
||||||
|
@ -215,6 +215,18 @@ let self = _self // overrides; _self = with self; {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fsnotify = buildGoPackage rec {
|
||||||
|
rev = "4894fe7efedeeef21891033e1cce3b23b9af7ad2";
|
||||||
|
name = "fsnotify-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
|
goPackagePath = "github.com/howeyc/fsnotify";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
|
owner = "howeyc";
|
||||||
|
repo = "fsnotify";
|
||||||
|
sha256 = "09r3h200nbw8a4d3rn9wxxmgma2a8i6ssaplf3zbdc2ykizsq7mn";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
g2s = buildGoPackage rec {
|
g2s = buildGoPackage rec {
|
||||||
rev = "ec76db4c1ac16400ac0e17ca9c4840e1d23da5dc";
|
rev = "ec76db4c1ac16400ac0e17ca9c4840e1d23da5dc";
|
||||||
name = "g2s-${stdenv.lib.strings.substring 0 7 rev}";
|
name = "g2s-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
@ -619,6 +631,18 @@ let self = _self // overrides; _self = with self; {
|
|||||||
go-homedir ldap g2s gox govers ];
|
go-homedir ldap g2s gox govers ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
httprouter = buildGoPackage rec {
|
||||||
|
rev = "bde5c16eb82ff15a1734a3818d9b9547065f65b1";
|
||||||
|
name = "httprouter-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
|
goPackagePath = "github.com/julienschmidt/httprouter";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
|
owner = "julienschmidt";
|
||||||
|
repo = "httprouter";
|
||||||
|
sha256 = "1l74pvqqhhval4vfnhca9d6i1ij69qs3ljf41w3m1l2id42rq7r9";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
influxdb-go = buildGoPackage rec {
|
influxdb-go = buildGoPackage rec {
|
||||||
rev = "63c9a5f67dcb633d05164bf8442160c9e2e402f7";
|
rev = "63c9a5f67dcb633d05164bf8442160c9e2e402f7";
|
||||||
name = "influxdb-go-${stdenv.lib.strings.substring 0 7 rev}";
|
name = "influxdb-go-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
@ -913,6 +937,18 @@ let self = _self // overrides; _self = with self; {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pushover = buildGoPackage rec {
|
||||||
|
rev = "a8420a1935479cc266bda685cee558e86dad4b9f";
|
||||||
|
name = "pushover-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
|
goPackagePath = "github.com/thorduri/pushover";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
|
owner = "thorduri";
|
||||||
|
repo = "pushover";
|
||||||
|
sha256 = "0j4k43ppka20hmixlwhhz5mhv92p6wxbkvdabs4cf7k8jpk5argq";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
raw = buildGoPackage rec {
|
raw = buildGoPackage rec {
|
||||||
rev = "724aedf6e1a5d8971aafec384b6bde3d5608fba4";
|
rev = "724aedf6e1a5d8971aafec384b6bde3d5608fba4";
|
||||||
name = "raw-${stdenv.lib.strings.substring 0 7 rev}";
|
name = "raw-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
|
Loading…
Reference in New Issue
Block a user