diff options
author | lethalman <lucabru@src.gnome.org> | 2015-03-24 10:11:15 +0100 |
---|---|---|
committer | lethalman <lucabru@src.gnome.org> | 2015-03-24 10:11:15 +0100 |
commit | 990d8d1a6041106b44ba97bf33d37027c3df515c (patch) | |
tree | 9cacc402f3df5b8f7fb3bd8402cfdc2c2fbfde3e /pkgs/servers | |
parent | 4b34f11b799cd03bcb4edeb8c38bdc8336ad8daa (diff) | |
parent | bcc8293cba6757a3d58719502a404bfb7a95d29b (diff) | |
download | nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.tar nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.tar.gz nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.tar.bz2 nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.tar.lz nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.tar.xz nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.tar.zst nixlib-990d8d1a6041106b44ba97bf33d37027c3df515c.zip |
Merge pull request #6408 from benley/prometheus
New packages: Prometheus monitoring system
Diffstat (limited to 'pkgs/servers')
8 files changed, 294 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/prometheus/alertmanager/default.nix b/pkgs/servers/monitoring/prometheus/alertmanager/default.nix new file mode 100644 index 000000000000..4ef870bfcf93 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/alertmanager/default.nix @@ -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; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/cli/default.nix b/pkgs/servers/monitoring/prometheus/cli/default.nix new file mode 100644 index 000000000000..f1f5ef9975c5 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/cli/default.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-cli-0.2.0"; + goPackagePath = "github.com/prometheus/prometheus_cli"; + src = fetchFromGitHub { + owner = "prometheus"; + repo = "prometheus_cli"; + rev = "b36c21d2301cf686bff81953573a29a6d5a0a883"; + sha256 = "190dlc6fyrfgxab4xj3gaz4jwx33jhzg57d8h36xjx56gbvp7iyk"; + }; + + buildInputs = [ + goPackages.prometheus.client_model + goPackages.prometheus.client_golang + ]; + + meta = with lib; { + description = "Command line tool for querying the Prometheus HTTP API"; + homepage = https://github.com/prometheus/prometheus_cli; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix new file mode 100644 index 000000000000..6e181c6ec9e4 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -0,0 +1,56 @@ +{ stdenv, lib, goPackages, fetchFromGitHub, protobuf, vim }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-${version}"; + version = "0.12.0"; + goPackagePath = "github.com/prometheus/prometheus"; + rev = "55dcb55498b43bafe94915a4de7907d6d66b4427"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "prometheus"; + sha256 = "17bbdk9axr91m2947ddbnzqwaap2vrzsbknbrlpdsmlsjhc8h7cb"; + }; + + buildInputs = [ + dns glog goleveldb prometheus.client_golang + goPackages.protobuf + protobuf # the non-golang package, for protoc + vim # for xxd, used in embed-static.sh + ]; + + # Metadata that gets embedded into the binary + buildFlagsArray = '' + -ldflags= + -X main.buildVersion ${version} + -X main.buildRevision ${builtins.substring 0 6 rev} + -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} ../utility/embed-static.sh static templates \ + | gofmt > blob/files.go + ) + ''; + + meta = with lib; { + description = "Service monitoring system and time series database"; + homepage = http://prometheus.github.io; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix b/pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix new file mode 100644 index 000000000000..63c421cd8a28 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, goPackages, fetchFromGitHub, }: + +goPackages.buildGoPackage rec { + name = "prometheus-haproxy-exporter-0.4.0"; + goPackagePath = "github.com/prometheus/haproxy_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "haproxy_exporter"; + rev = "6ee6d1df3e68ed73df37c9794332b2594e4da45d"; + sha256 = "0lbwv6jsdfjd9ihiky3lq7d5rkxqjh7xfaziw8i3w34a38japlpr"; + }; + + buildInputs = [ goPackages.prometheus.client_golang ]; + + meta = with lib; { + description = "HAProxy Exporter for the Prometheus monitoring system"; + homepage = https://github.com/prometheus/haproxy_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix b/pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix new file mode 100644 index 000000000000..c8793e17abb7 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix @@ -0,0 +1,24 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-mesos-exporter-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "a4a6638d6db6b5137e130cd4903b30dd82b78e9a"; + goPackagePath = "github.com/prometheus/mesos_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "mesos_exporter"; + sha256 = "1h4yxfcr8l9i2m1s5ygk3slhxdrs4mvmpn3sq8m5s205abvp891q"; + }; + + buildInputs = [ goPackages.mesos-stats ]; + + meta = with lib; { + description = "Export Mesos metrics to Prometheus"; + homepage = https://github.com/prometheus/mesos_exporter; + licenses = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/node_exporter/default.nix b/pkgs/servers/monitoring/prometheus/node_exporter/default.nix new file mode 100644 index 000000000000..97169a0e298b --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/node_exporter/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-node-exporter-0.8.0"; + goPackagePath = "github.com/prometheus/node_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "node_exporter"; + rev = "aaf01e52e25883671fd67234b415df7abd0e4eac"; + sha256 = "0j1qvgsc2hcv50l9lyfivkzsyjkjp3w1yyqvd1gzfybk7hi59dya"; + }; + + buildInputs = [ + glog + go-runit + ntp + prometheus.client_golang + prometheus.client_model + protobuf + ]; + + meta = with lib; { + description = "Prometheus exporter for machine metrics"; + homepage = https://github.com/prometheus/node_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/pushgateway/default.nix b/pkgs/servers/monitoring/prometheus/pushgateway/default.nix new file mode 100644 index 000000000000..db66e963208e --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/pushgateway/default.nix @@ -0,0 +1,51 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-pushgateway-${version}"; + version = "0.1.0"; + goPackagePath = "github.com/prometheus/pushgateway"; + rev = "3f1d42dade342ddb88381607358bae61a0a6b6c7"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "pushgateway"; + sha256 = "1wqxbl9rlnxszp9ylvdbx6f5lyj2z0if3x099fnjahbqmz8yhnf4"; + }; + + buildInputs = [ + go-bindata + protobuf + httprouter + golang_protobuf_extensions + prometheus.client_golang + ]; + + buildFlagsArray = '' + -ldflags= + -X main.buildVersion ${version} + -X main.buildRev ${rev} + -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" + go-bindata ./resources/ + ) + ''; + + meta = with lib; { + description = + "Allows ephemeral and batch jobs to expose metrics to Prometheus"; + homepage = https://github.com/prometheus/pushgateway; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix b/pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix new file mode 100644 index 000000000000..231aa31802c8 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix @@ -0,0 +1,27 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-statsd-bridge-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "9715b183150c7bed8a10affb23d33fb55c597180"; + goPackagePath = "github.com/prometheus/statsd_bridge"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "statsd_bridge"; + sha256 = "119024xb08qjwbhplpl5d94bjdfhn92w4ffn4kxr7aviri1gynfz"; + }; + + buildInputs = with goPackages; [ + fsnotify + prometheus.client_golang + ]; + + meta = with lib; { + description = "Receives StatsD-style metrics and exports them to Prometheus"; + homepage = https://github.com/prometheus/statsd_bridge; + licenses = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} |