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..136a1e05851d --- /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.7.1"; + goPackagePath = "github.com/prometheus/node_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "node_exporter"; + rev = "0c8bfba04df87b90e69a79b2d25a5f627ebde1bb"; + sha256 = "12aj65hl9wql24rlpadd6mibf7sp8593xr1vljgyd5xdf7wjkxn9"; + }; + + 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bff75e5131cd..d23623d1a6df 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-node-exporter = + callPackage ../servers/monitoring/prometheus/node_exporter { }; prometheus-pushgateway = callPackage ../servers/monitoring/prometheus/pushgateway { }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index a9705d972bd2..53c9d2d70681 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -537,6 +537,18 @@ let self = _self // overrides; _self = with self; { }; }; + go-runit = buildGoPackage rec { + rev = "a9148323a615e2e1c93b7a9893914a360b4945c8"; + name = "go-runit-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/soundcloud/go-runit"; + src = fetchFromGitHub { + inherit rev; + owner = "soundcloud"; + repo = "go-runit"; + sha256 = "00f2rfhsaqj2wjanh5qp73phx7x12a5pwd7lc0rjfv68l6sgpg2v"; + }; + }; + go-simplejson = buildGoPackage rec { rev = "1cfceb0e12f47ec02665ef480212d7b531d6f4c5"; name = "go-simplejson-${stdenv.lib.strings.substring 0 7 rev}"; @@ -793,6 +805,18 @@ let self = _self // overrides; _self = with self; { }; }; + ntp = buildGoPackage rec { + rev = "0a5264e2563429030eb922f258229ae3fee5b5dc"; + name = "ntp-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/beevik/ntp"; + src = fetchFromGitHub { + inherit rev; + owner = "beevik"; + repo = "ntp"; + sha256 = "03fvgbjf2aprjj1s6wdc35wwa7k1w5phkixzvp5n1j21sf6w4h24"; + }; + }; + oglematchers = buildGoPackage rec { rev = "4fc24f97b5b74022c2a3f4ca7eed57ca29083d3e"; name = "oglematchers-${stdenv.lib.strings.substring 0 7 rev}";