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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d23623d1a6df..921288ab8ccd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8389,6 +8389,8 @@ let callPackage ../servers/monitoring/prometheus/cli { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; + prometheus-mesos-exporter = + callPackage ../servers/monitoring/prometheus/mesos_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 42917a99c06d..4f9f6947c98d 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -782,6 +782,20 @@ let self = _self // overrides; _self = with self; { propagatedBuildInputs = [ go-codec armon.go-metrics ]; }; + mesos-stats = buildGoPackage rec { + rev = "0c6ea494c19bedc67ebb85ce3d187ec21050e920"; + name = "mesos-stats-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/antonlindstrom/mesos_stats"; + src = fetchFromGitHub { + inherit rev; + owner = "antonlindstrom"; + repo = "mesos_stats"; + sha256 = "18ggyjf4nyn77gkn16wg9krp4dsphgzdgcr3mdflv6mvbr482ar4"; + }; + + propagatedBuildInputs = [ prometheus.client_golang glog ]; + }; + mgo = buildGoPackage rec { rev = "2"; name = "mgo-${rev}";