From af142824cbf490dd9117f0a5a8fb69da7a6e402a Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sun, 24 May 2015 00:21:47 -0700 Subject: [PATCH] New package: prometheus-mysqld-exporter --- .../prometheus/mysqld_exporter/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/mysqld_exporter/default.nix diff --git a/pkgs/servers/monitoring/prometheus/mysqld_exporter/default.nix b/pkgs/servers/monitoring/prometheus/mysqld_exporter/default.nix new file mode 100644 index 000000000000..0b399d0cfff5 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/mysqld_exporter/default.nix @@ -0,0 +1,27 @@ +{ goPackages, lib, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-mysqld-exporter-${rev}"; + rev = "0.1.0"; + goPackagePath = "github.com/prometheus/mysqld_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "mysqld_exporter"; + inherit rev; + sha256 = "10xnyxyb6saz8pq3ijp424hxy59cvm1b5c9zcbw7ddzzkh1f6jd9"; + }; + + buildInputs = with goPackages; [ + mysql + prometheus.client_golang + ]; + + meta = with lib; { + description = "Prometheus exporter for MySQL server metrics"; + homepage = https://github.com/prometheus/mysqld_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 208000292bd1..c7f4e396639a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8812,6 +8812,8 @@ let callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; prometheus-mesos-exporter = callPackage ../servers/monitoring/prometheus/mesos_exporter { }; + prometheus-mysqld-exporter = + callPackage ../servers/monitoring/prometheus/mysqld_exporter { }; prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node_exporter { }; prometheus-pushgateway =