diff --git a/pkgs/development/go-modules/libs.json b/pkgs/development/go-modules/libs.json index deec3354f97b..731e43300da4 100644 --- a/pkgs/development/go-modules/libs.json +++ b/pkgs/development/go-modules/libs.json @@ -1222,5 +1222,23 @@ "rev": "439e5db48fbb50ebbaf2c816030473a62f505f55", "sha256": "1fl23gsw2hn3c1y91qckr661sybqcw2gqnd1gllxn3hp6p2w6hxv" } + }, + { + "goPackagePath": "github.com/soundcloud/go-runit", + "fetch": { + "type": "git", + "url": "https://github.com/soundcloud/go-runit", + "rev": "a9148323a615e2e1c93b7a9893914a360b4945c8", + "sha256": "00f2rfhsaqj2wjanh5qp73phx7x12a5pwd7lc0rjfv68l6sgpg2v" + } + }, + { + "goPackagePath": "github.com/beevik/ntp", + "fetch": { + "type": "git", + "url": "https://github.com/beevik/ntp", + "rev": "0a5264e2563429030eb922f258229ae3fee5b5dc", + "sha256": "03fvgbjf2aprjj1s6wdc35wwa7k1w5phkixzvp5n1j21sf6w4h24" + } } ] diff --git a/pkgs/servers/monitoring/prometheus/node-exporter.nix b/pkgs/servers/monitoring/prometheus/node-exporter.nix new file mode 100644 index 000000000000..276ff73d0fcc --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/node-exporter.nix @@ -0,0 +1,30 @@ +# This file was generated by go2nix. +{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +with goPackages; + +buildGoPackage rec { + name = "node_exporter-${version}"; + version = "0.11.0"; + rev = version; + + goPackagePath = "github.com/prometheus/node_exporter"; + + src = fetchgit { + inherit rev; + url = "https://github.com/prometheus/node_exporter"; + sha256 = "149fs9yxnbiyd4ww7bxsv730mcskblpzb3cs4v12jnq2v84a4kk4"; + }; + + goDeps = ./node-exporter_deps.json; + + doCheck = true; + + meta = with stdenv.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/node-exporter_deps.json b/pkgs/servers/monitoring/prometheus/node-exporter_deps.json new file mode 100644 index 000000000000..68020e73b1ce --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/node-exporter_deps.json @@ -0,0 +1,18 @@ +[ + { + "include": "../../libs.json", + "packages": [ + "github.com/soundcloud/go-runit", + "github.com/beevik/ntp", + "github.com/prometheus/client_golang", + "github.com/prometheus/client_model", + "bitbucket.org/ww/goautoneg", + "github.com/Sirupsen/logrus", + "github.com/beorn7/perks", + "github.com/matttproud/golang_protobuf_extensions", + "github.com/prometheus/log", + "github.com/golang/protobuf", + "github.com/prometheus/procfs" + ] + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2f491659d08b..16724f7edfc1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10186,7 +10186,7 @@ in prometheus-mesos-exporter = callPackage ../servers/monitoring/prometheus/mesos-exporter.nix { }; prometheus-mysqld-exporter = callPackage ../servers/monitoring/prometheus/mysqld-exporter.nix { }; prometheus-nginx-exporter = callPackage ../servers/monitoring/prometheus/nginx-exporter.nix { }; - prometheus-node-exporter = goPackages.prometheus.node-exporter.bin // { outputs = [ "bin" ]; }; + prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node-exporter.nix { }; prometheus-pushgateway = goPackages.prometheus.pushgateway.bin // { outputs = [ "bin" ]; }; prometheus-statsd-bridge = goPackages.prometheus.statsd-bridge.bin // { outputs = [ "bin" ]; };