From 3309a15be9d28a546184f1ffdc81bde2b6e2d8fd Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Mon, 1 Jun 2015 12:28:21 -0700 Subject: [PATCH] New package: prometheus-nginx-exporter Adding to the growing collection of prometheus tools... --- .../prometheus/nginx_exporter/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/go-packages.nix | 13 +++++++++ 3 files changed, 42 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/nginx_exporter/default.nix diff --git a/pkgs/servers/monitoring/prometheus/nginx_exporter/default.nix b/pkgs/servers/monitoring/prometheus/nginx_exporter/default.nix new file mode 100644 index 000000000000..b45b2784042e --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/nginx_exporter/default.nix @@ -0,0 +1,27 @@ +{ lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-nginx-exporter-${version}"; + version = "git-2015-06-01"; + goPackagePath = "github.com/discordianfish/nginx_exporter"; + + src = fetchFromGitHub { + owner = "discordianfish"; + repo = "nginx_exporter"; + rev = "2cf16441591f6b6e58a8c0439dcaf344057aea2b"; + sha256 = "0p9j0bbr2lr734980x2p8d67lcify21glwc5k3i3j4ri4vadpxvc"; + }; + + buildInputs = [ + goPackages.prometheus.client_golang + goPackages.prometheus.log + ]; + + meta = with lib; { + description = "Metrics relay from nginx stats to Prometheus"; + homepage = https://github.com/discordianfish/nginx_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c28a6c98c70..b62f3be98cbd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8939,6 +8939,8 @@ let callPackage ../servers/monitoring/prometheus/mesos_exporter { }; prometheus-mysqld-exporter = callPackage ../servers/monitoring/prometheus/mysqld_exporter { }; + prometheus-nginx-exporter = + callPackage ../servers/monitoring/prometheus/nginx_exporter { }; prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node_exporter { }; prometheus-pushgateway = diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 9af04081000d..2df0439e4e2a 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -1991,6 +1991,19 @@ let buildInputs = [ protobuf ]; }; + prometheus.log = buildGoPackage rec { + name = "prometheus-log-${version}"; + version = "git-2015-05-29"; + goPackagePath = "github.com/prometheus/log"; + src = fetchFromGitHub { + rev = "439e5db48fbb50ebbaf2c816030473a62f505f55"; + owner = "prometheus"; + repo = "log"; + sha256 = "1fl23gsw2hn3c1y91qckr661sybqcw2gqnd1gllxn3hp6p2w6hxv"; + }; + propagatedBuildInputs = [ logrus ]; + }; + prometheus.procfs = buildGoPackage rec { rev = "351fbfac67c8ae8bcacd468f678f5e8d5a585d3d"; name = "prometheus-procfs-${stdenv.lib.strings.substring 0 7 rev}";