diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/prometheus')
40 files changed, 1995 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/alertmanager.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/alertmanager.nix new file mode 100644 index 000000000000..530c4305088b --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/alertmanager.nix @@ -0,0 +1,42 @@ +{ stdenv, go, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "alertmanager-${version}"; + version = "0.15.3"; + rev = "v${version}"; + + goPackagePath = "github.com/prometheus/alertmanager"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "alertmanager"; + sha256 = "037wwfadb9rp1592v8bkqcsy9ym4gbhkg3pz6a6fzirg65d29aia"; + }; + + # Tests exist, but seem to clash with the firewall. + doCheck = false; + + buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in '' + -ldflags= + -X ${t}.Version=${version} + -X ${t}.Revision=${src.rev} + -X ${t}.Branch=unknown + -X ${t}.BuildUser=nix@nixpkgs + -X ${t}.BuildDate=unknown + -X ${t}.GoVersion=${stdenv.lib.getVersion go} + ''; + + postInstall = '' + mkdir -p $bin/etc/bash_completion.d + $NIX_BUILD_TOP/go/bin/amtool --completion-script-bash > $bin/etc/bash_completion.d/amtool_completion.sh + ''; + + meta = with stdenv.lib; { + description = "Alert dispatcher for the Prometheus monitoring system"; + homepage = https://github.com/prometheus/alertmanager; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/bind-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/bind-exporter.nix new file mode 100644 index 000000000000..db58c7e14e5f --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/bind-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "bind_exporter-${version}"; + version = "20161221-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "4e1717c7cd5f31c47d0c37274464cbaabdd462ba"; + + goPackagePath = "github.com/digitalocean/bind_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "digitalocean"; + repo = "bind_exporter"; + sha256 = "1nd6pc1z627w4x55vd42zfhlqxxjmfsa9lyn0g6qq19k4l85v1qm"; + }; + + meta = with stdenv.lib; { + description = "Prometheus exporter for bind9 server"; + homepage = https://github.com/digitalocean/bind_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ rtreffer ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix new file mode 100644 index 000000000000..1f342adebaa0 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "blackbox_exporter-${version}"; + version = "0.12.0"; + rev = version; + + goPackagePath = "github.com/prometheus/blackbox_exporter"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "prometheus"; + repo = "blackbox_exporter"; + sha256 = "0gd3vymk3qdfjnf0rx9kwc6v0jv7f8l30igvj2v7bljar2d6hzxf"; + }; + + meta = with stdenv.lib; { + description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP"; + homepage = https://github.com/prometheus/blackbox_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ globin fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/collectd-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/collectd-exporter.nix new file mode 100644 index 000000000000..0d6fbac60e5d --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/collectd-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "collectd-exporter-${version}"; + version = "0.3.1"; + rev = version; + + goPackagePath = "github.com/prometheus/collectd_exporter"; + + src= fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "collectd_exporter"; + sha256 = "1p0kb7c8g0r0sp5a6xrx8vnwbw14hhwlqzk4n2xx2y8pvnbivajz"; + }; + + meta = with stdenv.lib; { + description = "Relay server for exporting metrics from collectd to Prometheus"; + homepage = https://github.com/prometheus/collectd_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/consul-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/consul-exporter.nix new file mode 100644 index 000000000000..47abcb33ee79 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/consul-exporter.nix @@ -0,0 +1,23 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "consul_exporter-${version}"; + version = "0.3.0"; + + goPackagePath = "github.com/prometheus/consul_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "consul_exporter"; + rev = "v${version}"; + sha256 = "1zffbxyfmqpbdqkx5rb5vjgd9j4p4zcrh6jvn1zhbdzrcs7khnd9"; + }; + + meta = with stdenv.lib; { + description = "Prometheus exporter for Consul metrics"; + homepage = https://github.com/prometheus/consul_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ hectorj ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/default.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/default.nix new file mode 100644 index 000000000000..03080376ec2a --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/default.nix @@ -0,0 +1,56 @@ +{ stdenv, go, buildGoPackage, fetchFromGitHub }: + +let + goPackagePath = "github.com/prometheus/prometheus"; + + generic = { version, sha256, ... }@attrs: + let attrs' = builtins.removeAttrs attrs ["version" "sha256"]; in + buildGoPackage ({ + name = "prometheus-${version}"; + + inherit goPackagePath; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "prometheus"; + repo = "prometheus"; + inherit sha256; + }; + + doCheck = true; + + buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in '' + -ldflags= + -X ${t}.Version=${version} + -X ${t}.Revision=unknown + -X ${t}.Branch=unknown + -X ${t}.BuildUser=nix@nixpkgs + -X ${t}.BuildDate=unknown + -X ${t}.GoVersion=${stdenv.lib.getVersion go} + ''; + + preInstall = '' + mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus" + cp -a $src/documentation/* $bin/share/doc/prometheus + cp -a $src/console_libraries $src/consoles $bin/etc/prometheus + ''; + + meta = with stdenv.lib; { + description = "Service monitoring system and time series database"; + homepage = https://prometheus.io; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz ]; + platforms = platforms.unix; + }; + } // attrs'); +in rec { + prometheus_1 = generic { + version = "1.8.2"; + sha256 = "088flpg3qgnj9afl9vbaa19v2s1d21yxy38nrlv5m7cxwy2pi5pv"; + }; + + prometheus_2 = generic { + version = "2.6.0"; + sha256 = "1d9zwzs280pw9zspqwp7xx3ji04lfg2v9l5qhrfy3y633ghcmpxz"; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix new file mode 100644 index 000000000000..1acf859e81a6 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix @@ -0,0 +1,93 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3a771d992973f24aa725d07868b467d1ddfceafb"; + sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "b4deda0973fb4c70b50d226b1af49f3da59f5265"; + sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/miekg/dns"; + fetch = { + type = "git"; + url = "https://github.com/miekg/dns"; + rev = "9c76f9827e170bfcd354c2cb02a6fd428faf81a6"; + sha256 = "0yym4jr15cqwlppnqfsp92i7p1ir12ys695wffb3in7gnnm0d38n"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "82f5ff156b29e276022b1a958f7d385870fb9814"; + sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "d811d2e9bf898806ecfb6ef6296774b13ffc314c"; + sha256 = "0r4067r4ysmljksqw3awcxx5qplqhykahc5igdzgkky7i4bvaik1"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e"; + sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "640f4622ab692b87c2f3a94265e6f579fe38263d"; + sha256 = "097m4qhcljhp180171j5fjhq4740iirfkkajfd7yrxqhp4s9hljx"; + }; + } + { + goPackagePath = "golang.org/x/sync"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sync"; + rev = "1d60e4601c6fd243af51cc01ddf169918a5407ca"; + sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix new file mode 100644 index 000000000000..bcfc82adf478 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix @@ -0,0 +1,23 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "dnsmasq_exporter-unstable-2018-05-05"; + + goPackagePath = "github.com/google/dnsmasq_exporter"; + + src = fetchFromGitHub { + owner = "google"; + repo = "dnsmasq_exporter"; + sha256 = "1kzq4h7z28xadx425nbgxadk62yiz6279d300fyiyi83hwq0ay8c"; + rev = "e1f281b435bbefbb2d17fc57c051ede0ab973c59"; + }; + + goDeps = ./dnsmasq-exporter-deps.nix; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "A dnsmasq exporter for Prometheus"; + license = licenses.asl20; + maintainers = with maintainers; [ willibutz ]; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix new file mode 100644 index 000000000000..d94aad821485 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix @@ -0,0 +1,102 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/alecthomas/template"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/template"; + rev = "a0175ee3bccc567396460bf5acd36800cb10c49c"; + sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj"; + }; + } + { + goPackagePath = "github.com/alecthomas/units"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/units"; + rev = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a"; + sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3a771d992973f24aa725d07868b467d1ddfceafb"; + sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; + }; + } + { + goPackagePath = "github.com/gogo/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/gogo/protobuf"; + rev = "4aa4cc277ae58d2fab6cfe51dd17df5dceaf457d"; + sha256 = "009z6rpivyakgsxs0zkm94c9i7l65hcw2ljvah94wq3y6v6j47gs"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "0f2620f554cf5c8e281a2eb655a035f5a0f6dc90"; + sha256 = "0lxngq1a8cnsy6dlr6gi8pjv3fir2wiw76qh075pa9g02h7ywhv3"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "b5bfa0eb2c8d46bd91dc58271e973c5f0bbebcfa"; + sha256 = "1msxzkdgi0ing4ddmp0s4qrf267n6ylafw9mbz5yrr7spb1dgxgk"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f"; + sha256 = "04psf81l9fjcwascsys428v03fx4fi894h7fhrj2vvcz723q57k0"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "c7de2306084e37d54b8be01f3541a8464345e9a5"; + sha256 = "11dqfm2d0m4sjjgyrnayman96g59x2apmvvqby9qmww2qj2k83ig"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "05ee40e3a273f7245e8777337fc7b46e533a9a92"; + sha256 = "0f6fnczxa42b9rys2h3l0m8fy3x5hrhaq707vq0lbx5fcylw8lis"; + }; + } + { + goPackagePath = "gopkg.in/alecthomas/kingpin.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/alecthomas/kingpin.v2"; + rev = "947dcec5ba9c011838740e680966fd7087a71d0d"; + sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/dovecot-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/dovecot-exporter.nix new file mode 100644 index 000000000000..5a3fd23ec22e --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/dovecot-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "dovecot_exporter-${version}"; + version = "0.1.3"; + + goPackagePath = "github.com/kumina/dovecot_exporter"; + + src = fetchFromGitHub { + owner = "kumina"; + repo = "dovecot_exporter"; + rev = version; + sha256 = "1lnxnnm45fhcyv40arcvpiiibwdnxdwhkf8sbjpifx1wspvphcj9"; + }; + + goDeps = ./dovecot-exporter-deps.nix; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Prometheus metrics exporter for Dovecot"; + license = licenses.asl20; + maintainers = with maintainers; [ willibutz ]; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/fritzbox-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/fritzbox-exporter.nix new file mode 100644 index 000000000000..1271b3d40e14 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/fritzbox-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "fritzbox-exporter-${version}"; + version = "1.0"; + rev = "v${version}"; + + goPackagePath = "github.com/ndecker/fritzbox_exporter"; + + src= fetchFromGitHub { + inherit rev; + owner = "ndecker"; + repo = "fritzbox_exporter"; + sha256 = "1qk3dgxxz3cnz52jzz0yvfkrkk4s5kdhc26nbfgdpn0ifzqj0awr"; + }; + + meta = with stdenv.lib; { + description = "FRITZ!Box UPnP statistics exporter for prometheus"; + homepage = https://github.com/ndecker/fritzbox_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ bachp ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/haproxy-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/haproxy-exporter.nix new file mode 100644 index 000000000000..b2a0e3875891 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/haproxy-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "haproxy_exporter-${version}"; + version = "0.8.0"; + rev = "v${version}"; + + goPackagePath = "github.com/prometheus/haproxy_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "haproxy_exporter"; + sha256 = "0gx8pq67w71ch3g3c77xaz39msrd9graizc6d3shwabdjx35yc6q"; + }; + + meta = with stdenv.lib; { + description = "HAProxy Exporter for the Prometheus monitoring system"; + homepage = https://github.com/prometheus/haproxy_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix new file mode 100644 index 000000000000..ca1dc83e96ad --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, jre, makeWrapper }: + +let + version = "0.10"; + jarName = "jmx_prometheus_httpserver-${version}-jar-with-dependencies.jar"; + mavenUrl = "http://central.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/${version}/${jarName}"; +in stdenv.mkDerivation { + inherit version jarName; + + name = "jmx-prometheus-httpserver-${version}"; + + src = fetchurl { + url = mavenUrl; + sha256 = "1pvqphrirq48xhmx0aa6vkxz6qy1cx2q6jxsh7rin432iap7j62f"; + }; + + buildInputs = [ jre makeWrapper ]; + + phases = "installPhase"; + + installPhase = '' + mkdir -p $out/libexec + mkdir -p $out/bin + cp $src $out/libexec/$jarName + makeWrapper "${jre}/bin/java" $out/bin/jmx_prometheus_httpserver --add-flags "-jar $out/libexec/$jarName" + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/prometheus/jmx_exporter; + description = "A process for exposing JMX Beans via HTTP for Prometheus consumption"; + license = licenses.asl20; + maintainers = [ maintainers.offline ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/json-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/json-exporter.nix new file mode 100644 index 000000000000..aeb7b7445a5d --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/json-exporter.nix @@ -0,0 +1,30 @@ +# This file was generated by go2nix. +{ buildGoPackage, fetchFromGitHub, fetchpatch, lib }: + +buildGoPackage rec { + name = "prometheus-json-exporter-${version}"; + version = "unstable-2017-10-06"; + + goPackagePath = "github.com/kawamuray/prometheus-json-exporter"; + + src = fetchFromGitHub { + owner = "kawamuray"; + repo = "prometheus-json-exporter"; + rev = "51e3dc02a30ab818bb73e5c98c3853231c2dbb5f"; + sha256 = "1v1p4zcqnb3d3rm55r695ydn61h6gz95f55cpa22hzw18dasahdh"; + }; + + goDeps = ./json-exporter_deps.nix; + + patches = [(fetchpatch { # adds bool support + url = "https://patch-diff.githubusercontent.com/raw/kawamuray/prometheus-json-exporter/pull/17.patch"; + sha256 = "0mc5axhd2bykci41dgswl4r1552d70jsmb17lbih7czhsy6rgmrm"; + })]; + + meta = with lib; { + description = "A prometheus exporter which scrapes remote JSON by JSONPath"; + homepage = https://github.com/kawamuray/prometheus-json-exporter; + license = licenses.asl20; + maintainers = with maintainers; [ willibutz ]; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/json-exporter_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/json-exporter_deps.nix new file mode 100644 index 000000000000..9416125bc0c2 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/json-exporter_deps.nix @@ -0,0 +1,111 @@ +# This file was generated by go2nix. +[ + { + goPackagePath = "github.com/Sirupsen/logrus"; + fetch = { + type = "git"; + url = "https://github.com/Sirupsen/logrus"; + rev = "a437dfd2463eaedbec3dfe443e477d3b0a810b3f"; + sha256 = "1904s2bbc7p88anzjp6fyj3jrbm5p6wbb8j4490674dq10kkcfbj"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"; + sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "8ee79997227bf9b34611aee7946ae64735e6fd93"; + sha256 = "0qm1lpdhf97k2hxgivq2cpjgawhlmmz39y230kgxijhm96xijxb8"; + }; + } + { + goPackagePath = "github.com/kawamuray/jsonpath"; + fetch = { + type = "git"; + url = "https://github.com/kawamuray/jsonpath"; + rev = "5c448ebf973557834ef870e788b0b2d95ac68d12"; + sha256 = "1i1id1i85rf09rldp03h0ibyi6zg0fz9p9l5qj7i8dfs6h6y8f0a"; + }; + } + { + goPackagePath = "github.com/kawamuray/prometheus-exporter-harness"; + fetch = { + type = "git"; + url = "https://github.com/kawamuray/prometheus-exporter-harness"; + rev = "97eeea7b8b0619ea2a065d75c0f0f5909327afa6"; + sha256 = "12al8irf8jb6p2xmm4wbh0wjqsyrdywynr4w122wxxnsx2n56xyv"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "575f371f7862609249a1be4c9145f429fe065e32"; + sha256 = "0hyvszjv5m6i40k2fn21c3bjr8jhlfdqavk1r6g2v5dybyj47vps"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"; + sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "0d5de9d6d8629cb8bee6d4674da4127cd8b615a3"; + sha256 = "1zlvvgw67p66fz9nswkydq15j4a5z5kkiskl0jxps8i27ya1baq0"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "abf152e5f3e97f2fafac028d2cc06c1feb87ffa5"; + sha256 = "0cp8lznv1b4zhi3wnbjkfxwzhkqd3wbmiy6mwgjanip8l9l3ykws"; + }; + } + { + goPackagePath = "github.com/urfave/cli"; + fetch = { + type = "git"; + url = "https://github.com/urfave/cli"; + rev = "0bdeddeeb0f650497d603c4ad7b20cfe685682f6"; + sha256 = "1ny63c7bfwfrsp7vfkvb4i0xhq4v7yxqnwxa52y4xlfxs4r6v6fg"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "a5b47d31c556af34a302ce5d659e6fea44d90de0"; + sha256 = "0v6l48fshdjrqzyq1kwn22gy7vy434xdr1i0lm3prsf6jbln9fam"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/mesos-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/mesos-exporter.nix new file mode 100644 index 000000000000..ade9bb87d993 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/mesos-exporter.nix @@ -0,0 +1,26 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "mesos_exporter-${version}"; + version = "0.1.0"; + rev = version; + + goPackagePath = "github.com/prometheus/mesos_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "mesos_exporter"; + sha256 = "059az73j717gd960g4jigrxnvqrjh9jw1c324xpwaafa0bf10llm"; + }; + + goDeps = ./mesos-exporter_deps.nix; + + meta = with stdenv.lib; { + description = "Export Mesos metrics to Prometheus"; + homepage = https://github.com/prometheus/mesos_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.nix new file mode 100644 index 000000000000..e8fdcc95da2f --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.nix @@ -0,0 +1,83 @@ +[ + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "59b73b37c1e45995477aae817e4a653c89a858db"; + sha256 = "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"; + sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "b965b613227fddccbfffe13eae360ed3fa822f8d"; + sha256 = "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"; + sha256 = "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "6dbab8106ed3ed77359ac85d9cf08e30290df864"; + sha256 = "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "c91d8eefde16bd047416409eb56353ea84a186e4"; + sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"; + }; + } + { + goPackagePath = "github.com/golang/glog"; + fetch = { + type = "git"; + url = "https://github.com/golang/glog"; + rev = "fca8c8854093a154ff1eb580aae10276ad6b1b5f"; + sha256 = "1nr2q0vas0a2f395f4shjxqpas18mjsf8yhgndsav7svngpbbpg8"; + }; + } + { + goPackagePath = "bitbucket.org/ww/goautoneg"; + fetch = { + type = "hg"; + url = "bitbucket.org/ww/goautoneg"; + rev = "75cd24fc2f2c2a2088577d12123ddee5f54e0675"; + sha256 = "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"; + }; + } + { + goPackagePath = "github.com/antonlindstrom/mesos_stats"; + fetch = { + type = "git"; + url = "https://github.com/antonlindstrom/mesos_stats"; + rev = "0c6ea494c19bedc67ebb85ce3d187ec21050e920"; + sha256 = "18ggyjf4nyn77gkn16wg9krp4dsphgzdgcr3mdflv6mvbr482ar4"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix new file mode 100644 index 000000000000..8b6c54d41f91 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix @@ -0,0 +1,35 @@ +{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch }: + +buildGoPackage rec { + name = "minio-exporter-${version}"; + version = "0.2.0"; + rev = "v${version}"; + + goPackagePath = "github.com/joe-pll/minio-exporter"; + + src= fetchFromGitHub { + inherit rev; + owner = "joe-pll"; + repo = "minio-exporter"; + sha256 = "1my3ii5s479appiapw8gjzkq1pk62fl7d7if8ljvdj6qw4man6aa"; + }; + + # Required to make 0.2.0 build against latest dependencies + # TODO: Remove on update to 0.3.0 + patches = [ + (fetchpatch { + url = "https://github.com/joe-pll/minio-exporter/commit/50ab89d42322dc3e2696326a9ae4d3f951f646de.patch"; + sha256 = "0aiixhvb4x8c8abrlf1i4hmca9i6xd6b638a5vfkvawx0q7gxl97"; + }) + ]; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + description = "A Prometheus exporter for Minio cloud storage server"; + homepage = https://github.com/joe-pll/minio-exporter; + license = licenses.asl20; + maintainers = with maintainers; [ bachp ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix new file mode 100644 index 000000000000..1993975e2bfa --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix @@ -0,0 +1,174 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/alecthomas/template"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/template"; + rev = "a0175ee3bccc567396460bf5acd36800cb10c49c"; + sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj"; + }; + } + { + goPackagePath = "github.com/alecthomas/units"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/units"; + rev = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a"; + sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"; + sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"; + }; + } + { + goPackagePath = "github.com/go-ini/ini"; + fetch = { + type = "git"; + url = "https://github.com/go-ini/ini"; + rev = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"; + sha256 = "0mhgxw5q6b0pryhikx3k4wby7g32rwjjljzihi47lwn34kw5y1qn"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "1e59b77b52bf8e4b449a57e6f79f21226d571845"; + sha256 = "19bkh81wnp6njg3931wky6hsnnl2d1ig20vfjxpv450sd3k6yys8"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/minio/minio-go"; + fetch = { + type = "git"; + url = "https://github.com/minio/minio-go"; + rev = "d218e4cb1bfc13dcef0eb5c3e74507a35be0dd3a"; + sha256 = "0d3am33xaavdffz791qi2s0vnkpjw9vlr5p5g4lw7h5vhmy1sjb4"; + }; + } + { + goPackagePath = "github.com/minio/minio"; + fetch = { + type = "git"; + url = "https://github.com/minio/minio"; + rev = "bb73c84b104bc447eb603d63481cdc54b8ab3c83"; + sha256 = "1gjkgdf59yxfr2a7pl3f7z3iid86zsd85xqxcv1s0d46v7j07iga"; + }; + } + { + goPackagePath = "github.com/mitchellh/go-homedir"; + fetch = { + type = "git"; + url = "https://github.com/mitchellh/go-homedir"; + rev = "b8bc1bf767474819792c23f32d8286a45736f1c6"; + sha256 = "13ry4lylalkh4g2vny9cxwvryslzyzwp9r92z0b10idhdq3wad1q"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "06bc6e01f4baf4ee783ffcd23abfcb0b0f9dfada"; + sha256 = "0dvv21214sn702kc25y5l0gd9d11358976d3w31fgwx7456mjx26"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "89604d197083d4781071d3c65855d24ecfb0a563"; + sha256 = "169rdlaf2mk9z4fydz7ajmngyhmf3q1lk96yhvx46bn986x5xkyn"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "b15cd069a83443be3154b719d0cc9fe8117f09fb"; + sha256 = "1cr45wg2m40bj2za8f32mq09rjlcnk5kfam0h0hr8wcb015k4wxj"; + }; + } + { + goPackagePath = "github.com/sirupsen/logrus"; + fetch = { + type = "git"; + url = "https://github.com/sirupsen/logrus"; + rev = "d682213848ed68c0a260ca37d6dd5ace8423f5ba"; + sha256 = "0nzyqwzx3k7nqfq8q7yv32gaf3ymq3bpwhkmw1hj2zakq5a93d8x"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "a6600008915114d9c087fad9f03d75087b1a74df"; + sha256 = "099vyf8133bjwaqcv377d9akam3j5xwamwqrihmjhvzbvqs649yc"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"; + sha256 = "0bdwdxy2gz48icnh023r5fga3z4x6c8gry8jlfjqr5w12y3s281g"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "2c42eef0765b9837fbdab12011af7830f55f88f0"; + sha256 = "0gj9nwryyzf9rn33gl3zm6rxvg1zhrhwi36akipqj37x4g86h3gz"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "e19ae1496984b1c655b8044a65c0300a3c878dd3"; + sha256 = "1cvnnx8nwx5c7gr6ajs7sldhbqh52n7h6fsa3i21l2lhx6xrsh4w"; + }; + } + { + goPackagePath = "gopkg.in/alecthomas/kingpin.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/alecthomas/kingpin.v2"; + rev = "947dcec5ba9c011838740e680966fd7087a71d0d"; + sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/mysqld-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/mysqld-exporter.nix new file mode 100644 index 000000000000..9180a5113492 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/mysqld-exporter.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "mysqld_exporter-${version}"; + version = "0.10.0"; + rev = "v${version}"; + + goPackagePath = "github.com/prometheus/mysqld_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "mysqld_exporter"; + sha256 = "1133bgyp5vljz2qvfh0qzq8h8bkc8vci3jnmbr633bh3jpaqm2py"; + }; + + meta = with stdenv.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/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix new file mode 100644 index 000000000000..5c5042b6c7cd --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix @@ -0,0 +1,25 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "nginx_exporter-${version}"; + version = "0.1.0"; + + goPackagePath = "github.com/discordianfish/nginx_exporter"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "discordianfish"; + repo = "nginx_exporter"; + sha256 = "1xwxnvkzslaj44r44ag24a9qfzjdxwz67hhpkdq42193zqpnlim7"; + }; + + goDeps = ./nginx-exporter_deps.nix; + + meta = with stdenv.lib; { + description = "Metrics relay from nginx stats to Prometheus"; + homepage = https://github.com/discordianfish/nginx_exporter; + license = licenses.mit; + maintainers = with maintainers; [ benley fpletz willibutz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.nix new file mode 100644 index 000000000000..2fa60de5b493 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.nix @@ -0,0 +1,119 @@ +[ + { + goPackagePath = "github.com/alecthomas/template"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/template"; + rev = "a0175ee3bccc567396460bf5acd36800cb10c49c"; + sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj"; + }; + } + { + goPackagePath = "github.com/alecthomas/units"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/units"; + rev = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a"; + sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3a771d992973f24aa725d07868b467d1ddfceafb"; + sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "b4deda0973fb4c70b50d226b1af49f3da59f5265"; + sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "82f5ff156b29e276022b1a958f7d385870fb9814"; + sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "d811d2e9bf898806ecfb6ef6296774b13ffc314c"; + sha256 = "0r4067r4ysmljksqw3awcxx5qplqhykahc5igdzgkky7i4bvaik1"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e"; + sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf"; + }; + } + { + goPackagePath = "github.com/sirupsen/logrus"; + fetch = { + type = "git"; + url = "https://github.com/sirupsen/logrus"; + rev = "778f2e774c725116edbc3d039dc0dfc1cc62aae8"; + sha256 = "0drlrl192k4qkpcf1b6nw2qlixply31x2jhcckjzl3hn4mzwi6nf"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "ae8bce0030810cf999bb2b9868ae5c7c58e6343b"; + sha256 = "0aihwcf0g8mq1sb96pwhpgvwxlf862pdhsfr7mdppz7bii4i9shw"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "78d5f264b493f125018180c204871ecf58a2dce1"; + sha256 = "0x23n60wskys39dwybz5za77ldky9i518kp58ragpd5528kcc68s"; + }; + } + { + goPackagePath = "gopkg.in/alecthomas/kingpin.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/alecthomas/kingpin.v2"; + rev = "947dcec5ba9c011838740e680966fd7087a71d0d"; + sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix new file mode 100644 index 000000000000..9714a6048e88 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix @@ -0,0 +1,29 @@ +{ stdenv, buildGo19Package, fetchFromGitHub }: + +# Go 1.10 causes segfaults: +# https://github.com/prometheus/node_exporter/issues/870 +buildGo19Package rec { + name = "node_exporter-${version}"; + version = "0.17.0"; + rev = "v${version}"; + + goPackagePath = "github.com/prometheus/node_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "node_exporter"; + sha256 = "08g4dg6zcr95j88apsxp828jfyx4vq271w1mgkf77c46c16d2nh0"; + }; + + # FIXME: tests fail due to read-only nix store + doCheck = false; + + meta = with stdenv.lib; { + description = "Prometheus exporter for machine metrics"; + homepage = https://github.com/prometheus/node_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/openvpn-exporter-deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/openvpn-exporter-deps.nix new file mode 100644 index 000000000000..93aae1b867e9 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/openvpn-exporter-deps.nix @@ -0,0 +1,66 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"; + sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "748d386b5c1ea99658fd69fe9f03991ce86a90c1"; + sha256 = "0xm0is6sj6r634vrfx85ir0gd9h1xxk25fgc5z07zrjp19f5wqp5"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "94ff84a9a6ebb5e6eb9172897c221a64df3443bc"; + sha256 = "188xwc13ml51i29fhp8bz4a7ncmk0lvdw3nnwr56k2l36pp1swil"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "6f3806018612930941127f2a7c6c453ba2c527d2"; + sha256 = "1413ibprinxhni51p0755dp57r9wvbw7xgj9nmdaxmhzlqhc86j4"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "3e6a7635bac6573d43f49f97b47eb9bda195dba8"; + sha256 = "1q4nwm9lf4jd90z08s6gz8j1zzrk2jn9vpw49xdb8mwxmhv13xgm"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2"; + sha256 = "18hwygbawbqilz7h8fl25xpbciwalkslb4igqn4cr9d8sqp7d3np"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/openvpn-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/openvpn-exporter.nix new file mode 100644 index 000000000000..eac962f75606 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/openvpn-exporter.nix @@ -0,0 +1,25 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "openvpn_exporter-unstable-${version}"; + version = "2017-05-15"; + rev = "a2a179a222144fa9a10030367045f075375a2803"; + + goPackagePath = "github.com/kumina/openvpn_exporter"; + + src = fetchFromGitHub { + owner = "kumina"; + repo = "openvpn_exporter"; + inherit rev; + sha256 = "1cjx7ascf532a20wwzrsx3qqs6dr04jyf700s3jvlvhhhx43l8m4"; + }; + + goDeps = ./openvpn-exporter-deps.nix; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Prometheus exporter for OpenVPN"; + license = licenses.asl20; + maintainers = with maintainers; [ fpletz ]; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix new file mode 100644 index 000000000000..07bedaba9f36 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix @@ -0,0 +1,66 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3a771d992973f24aa725d07868b467d1ddfceafb"; + sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "b4deda0973fb4c70b50d226b1af49f3da59f5265"; + sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "82f5ff156b29e276022b1a958f7d385870fb9814"; + sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "d811d2e9bf898806ecfb6ef6296774b13ffc314c"; + sha256 = "0r4067r4ysmljksqw3awcxx5qplqhykahc5igdzgkky7i4bvaik1"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e"; + sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/postfix-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/postfix-exporter.nix new file mode 100644 index 000000000000..97df26aea4e5 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/postfix-exporter.nix @@ -0,0 +1,56 @@ +{ stdenv, buildGoPackage, fetchFromGitHub, systemd, makeWrapper +, withSystemdSupport ? true }: + +with stdenv.lib; + +buildGoPackage rec { + name = "postfix_exporter-${version}"; + version = "0.1.2"; + + goPackagePath = "github.com/kumina/postfix_exporter"; + + src = fetchFromGitHub { + owner = "kumina"; + repo = "postfix_exporter"; + rev = version; + sha256 = "1b9ib3scxni6hlw55wv6f0z1xfn27l0p29as24f71rs70pyzy4hm"; + }; + + nativeBuildInputs = optional withSystemdSupport makeWrapper; + buildInputs = optional withSystemdSupport systemd; + buildFlags = optional (!withSystemdSupport) "-tags nosystemd"; + + goDeps = ./postfix-exporter-deps.nix; + extraSrcs = optionals withSystemdSupport [ + { + goPackagePath = "github.com/coreos/go-systemd"; + src = fetchFromGitHub { + owner = "coreos"; + repo = "go-systemd"; + rev = "d1b7d058aa2adfc795ad17ff4aaa2bc64ec11c78"; + sha256 = "1nz3v1b90hnmj2vjjwq96pr6psxlndqjyd30v9sgiwygzb7db9mv"; + }; + } + { + goPackagePath = "github.com/coreos/pkg"; + src = fetchFromGitHub { + owner = "coreos"; + repo = "pkg"; + rev = "97fdf19511ea361ae1c100dd393cc47f8dcfa1e1"; + sha256 = "1srn87wih25l09f75483hnxsr8fc6rq3bk7w1x8125ym39p6mg21"; + }; + } + ]; + + postInstall = optionalString withSystemdSupport '' + wrapProgram $bin/bin/postfix_exporter \ + --prefix LD_LIBRARY_PATH : "${systemd.lib}/lib" + ''; + + meta = { + inherit (src.meta) homepage; + description = "A Prometheus exporter for Postfix"; + license = licenses.asl20; + maintainers = with maintainers; [ willibutz ]; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/prom2json.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/prom2json.nix new file mode 100644 index 000000000000..5e4ebb581400 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/prom2json.nix @@ -0,0 +1,26 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "prom2json-${version}"; + version = "0.1.0"; + rev = "${version}"; + + goPackagePath = "github.com/prometheus/prom2json"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "prom2json"; + sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl"; + }; + + goDeps = ./prom2json_deps.nix; + + meta = with stdenv.lib; { + description = "Tool to scrape a Prometheus client and dump the result as JSON"; + homepage = https://github.com/prometheus/prom2json; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/prom2json_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/prom2json_deps.nix new file mode 100644 index 000000000000..20cabe3d3857 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/prom2json_deps.nix @@ -0,0 +1,38 @@ +[ + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "59b73b37c1e45995477aae817e4a653c89a858db"; + sha256 = "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"; + sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"; + sha256 = "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "6dbab8106ed3ed77359ac85d9cf08e30290df864"; + sha256 = "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/pushgateway.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/pushgateway.nix new file mode 100644 index 000000000000..6509f55d46ed --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/pushgateway.nix @@ -0,0 +1,43 @@ +{ stdenv, go, buildGoPackage, go-bindata, fetchFromGitHub }: + +buildGoPackage rec { + name = "pushgateway-${version}"; + version = "0.4.0"; + rev = "v${version}"; + + goPackagePath = "github.com/prometheus/pushgateway"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "pushgateway"; + sha256 = "19hsv42addcx4dsjdbh64y7ggjvaaay9gag0342gz7gyl9sr719f"; + }; + + buildInputs = [ go-bindata ]; + + preBuild = '' + ( + cd "go/src/$goPackagePath" + go-bindata ./resources/ + ) + ''; + + buildFlagsArray = '' + -ldflags= + -X main.buildVersion=${version} + -X main.buildRev=${rev} + -X main.buildBranch=${rev} + -X main.buildUser=nix@nixpkgs + -X main.buildDate=19700101-00:00:00 + -X main.goVersion=${stdenv.lib.getVersion go} + ''; + + meta = with stdenv.lib; { + description = "Allows ephemeral and batch jobs to expose metrics to Prometheus"; + homepage = https://github.com/prometheus/pushgateway; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix new file mode 100644 index 000000000000..34120ad3fdae --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix @@ -0,0 +1,26 @@ +# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "rabbitmq_exporter-${version}"; + version = "0.25.2"; + + goPackagePath = "github.com/kbudde/rabbitmq_exporter"; + + src = fetchFromGitHub { + owner = "kbudde"; + repo = "rabbitmq_exporter"; + rev = "8238c5d9ad509dab94e631cdecf3d75155fbdee4"; + sha256 = "1zb21jms2wlmiw5vhk1wyhv0xrv5a9y08y9q6x92hv727kjqjr6w"; + }; + + goDeps = ./rabbitmq-exporter_deps.nix; + + meta = with stdenv.lib; { + description = "Prometheus exporter for RabbitMQ"; + homepage = https://github.com/kbudde/rabbitmq_exporter; + license = licenses.mit; + maintainers = with maintainers; [ ocharles ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix new file mode 100644 index 000000000000..7a15a6a7b68c --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix @@ -0,0 +1,165 @@ +# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev +[ + { + goPackagePath = "github.com/Sirupsen/logrus"; + fetch = { + type = "git"; + url = "https://github.com/Sirupsen/logrus"; + rev = "95cd2b9c79aa5e72ab0bc69b7ccc2be15bf850f6"; + sha256 = "1rkkhl68iw523bwxmp2prdrp8pk62xfp52wifzvbmqf8v1svwsqv"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"; + sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"; + }; + } + { + goPackagePath = "github.com/cenk/backoff"; + fetch = { + type = "git"; + url = "https://github.com/cenk/backoff"; + rev = "61153c768f31ee5f130071d08fc82b85208528de"; + sha256 = "08x77mgb9zsj047n74rx6c16jjx985lmy4s6fl58mdgxgxjv54y5"; + }; + } + { + goPackagePath = "github.com/fsouza/go-dockerclient"; + fetch = { + type = "git"; + url = "https://github.com/fsouza/go-dockerclient"; + rev = "1d4f4ae73768d3ca16a6fb964694f58dc5eba601"; + sha256 = "1s3m8jq8z1cm5rkn7dmjacf38n6ihkkzbdfang2aa2cgs5wl28y0"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "1e59b77b52bf8e4b449a57e6f79f21226d571845"; + sha256 = "19bkh81wnp6njg3931wky6hsnnl2d1ig20vfjxpv450sd3k6yys8"; + }; + } + { + goPackagePath = "github.com/kbudde/gobert"; + fetch = { + type = "git"; + url = "https://github.com/kbudde/gobert"; + rev = "a6daecb9ddeb548b7cfb3f5ac9deef9ded522730"; + sha256 = "06g036w4dny8wdjwvprjjcdh0vx851qphgrvilrn5lghv3jdr29z"; + }; + } + { + goPackagePath = "github.com/kylelemons/godebug"; + fetch = { + type = "git"; + url = "https://github.com/kylelemons/godebug"; + rev = "d65d576e9348f5982d7f6d83682b694e731a45c6"; + sha256 = "0bc8j9kwkp0hrsz0sm7hav7cm5jp9d6ql8r2b3mz78xb1g65xhbc"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "3247c84500bff8d9fb6d579d800f20b3e091582c"; + sha256 = "12hcych25wf725zxdkpnyx4wa0gyxl8v4m8xmhdmmaki9bbmqd0d"; + }; + } + { + goPackagePath = "github.com/pkg/errors"; + fetch = { + type = "git"; + url = "https://github.com/pkg/errors"; + rev = "645ef00459ed84a119197bfb8d8205042c6df63d"; + sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "c5b7fccd204277076155f10851dad72b76a49317"; + sha256 = "1xqny3147g12n4j03kxm8s9mvdbs3ln6i56c655mybrn9jjy48kd"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "2e54d0b93cba2fd133edc32211dcc32c06ef72ca"; + sha256 = "14kn5w7imcxxlfdqxl21fsnlf1ms7200g3ldy29hwamldv8qlm7j"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "a6e9df898b1336106c743392c48ee0b71f5c4efa"; + sha256 = "0zyprdp9bnpywcb6b9dzwyiji60mgf0s9wnw98zndfg3xrgnkasz"; + }; + } + { + goPackagePath = "github.com/streadway/amqp"; + fetch = { + type = "git"; + url = "https://github.com/streadway/amqp"; + rev = "ff791c2d22d3f1588b4e2cc71a9fba5e1da90654"; + sha256 = "1drridn4k1n7qy82msvw9r18w4pmrah1nip36wixz098nzalz55x"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "94eea52f7b742c7cbe0b03b22f0c4c8631ece122"; + sha256 = "095zyvjb0m2pz382500miqadhk7w3nis8z3j941z8cq4rdafijvi"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "a8b9294777976932365dabb6640cf1468d95c70f"; + sha256 = "112v83jfwd1brwaanjijvb7da4dx1iqk8b4bf9ahx0hvir56c2g8"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "8b4580aae2a0dd0c231a45d3ccb8434ff533b840"; + sha256 = "1w66xqnpkskvj22a3f841qg4rgf0lzcrxp8678s6n07yw8qdh92p"; + }; + } + { + goPackagePath = "gopkg.in/ory-am/dockertest.v3"; + fetch = { + type = "git"; + url = "https://gopkg.in/ory-am/dockertest.v3"; + rev = "a7951f7a8442f0e70d36e499ed4d744f00af2963"; + sha256 = "13qv0vl79m2wirhbjs0k2a3cjl6ib7sw6rg98v95xxpn8r39ijzw"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/snmp-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/snmp-exporter.nix new file mode 100644 index 000000000000..be8fbd3d85cb --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/snmp-exporter.nix @@ -0,0 +1,27 @@ +{ stdenv, buildGoPackage, fetchFromGitHub, net_snmp }: + +buildGoPackage rec { + name = "snmp_exporter-${version}"; + version = "0.13.0"; + + goPackagePath = "github.com/prometheus/snmp_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "snmp_exporter"; + rev = "v${version}"; + sha256 = "071v9qqhp2hcbgml94dm1l212qi18by88r9755npq9ycrsmawkll"; + }; + + buildInputs = [ net_snmp ]; + + doCheck = true; + + meta = with stdenv.lib; { + description = "SNMP Exporter for Prometheus"; + homepage = https://github.com/prometheus/snmp_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ oida willibutz ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/statsd-bridge.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/statsd-bridge.nix new file mode 100644 index 000000000000..e5480e020372 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/statsd-bridge.nix @@ -0,0 +1,26 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "statsd_exporter-${version}"; + version = "0.4.0"; + rev = version; + + goPackagePath = "github.com/prometheus/statsd_bridge"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "prometheus"; + repo = "statsd_exporter"; + sha256 = "1w11n7g663g7d7mbf6jfzcqmcm9rhaxy52bg0rqnad9v0rs5qxr6"; + }; + + goDeps = ./statsd-bridge_deps.nix; + + meta = with stdenv.lib; { + description = "Receives StatsD-style metrics and exports them to Prometheus"; + homepage = https://github.com/prometheus/statsd_bridge; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.nix new file mode 100644 index 000000000000..fd11ab5a7eab --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.nix @@ -0,0 +1,74 @@ +[ + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "59b73b37c1e45995477aae817e4a653c89a858db"; + sha256 = "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"; + sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "b965b613227fddccbfffe13eae360ed3fa822f8d"; + sha256 = "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"; + sha256 = "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "6dbab8106ed3ed77359ac85d9cf08e30290df864"; + sha256 = "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "c91d8eefde16bd047416409eb56353ea84a186e4"; + sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"; + }; + } + { + goPackagePath = "bitbucket.org/ww/goautoneg"; + fetch = { + type = "hg"; + url = "bitbucket.org/ww/goautoneg"; + rev = "75cd24fc2f2c2a2088577d12123ddee5f54e0675"; + sha256 = "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"; + }; + } + { + goPackagePath = "github.com/howeyc/fsnotify"; + fetch = { + type = "git"; + url = "https://github.com/fsnotify/fsnotify"; + rev = "ea925a0a47d225b2ca7f9932b01d2ed4f3ec74f6"; + sha256 = "15wqjpkfzsxnaxbz6y4r91hw6812g3sc4ipagxw1bya9klbnkdc9"; + }; + } +] diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/surfboard-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/surfboard-exporter.nix new file mode 100644 index 000000000000..0c5cc6267659 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/surfboard-exporter.nix @@ -0,0 +1,23 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "surfboard_exporter-${version}"; + version = "2.0.0"; + + goPackagePath = "github.com/ipstatic/surfboard_exporter"; + + src = fetchFromGitHub { + rev = version; + owner = "ipstatic"; + repo = "surfboard_exporter"; + sha256 = "11qms26648nwlwslnaflinxcr5rnp55s908rm1qpnbz0jnxf5ipw"; + }; + + meta = with stdenv.lib; { + description = "Arris Surfboard signal metrics exporter"; + homepage = https://github.com/ipstatic/surfboard_exporter; + license = licenses.mit; + maintainers = with maintainers; [ disassembler ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/tor-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/tor-exporter.nix new file mode 100644 index 000000000000..88f469ebe179 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/tor-exporter.nix @@ -0,0 +1,37 @@ +{ lib, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonApplication rec { + name = "tor-exporter-${version}"; + version = "0.3"; + + # Just a single .py file to use as the application's main entry point. + format = "other"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "atx"; + repo = "prometheus-tor_exporter"; + sha256 = "0d7pk8s8ya2pm8b4ijbfdniqcbd3vqy15dlhnmaf4wgb51pmm5yv"; + }; + + propagatedBuildInputs = with python3Packages; [ prometheus_client stem retrying ]; + + installPhase = '' + mkdir -p $out/share/ + cp prometheus-tor-exporter.py $out/share/ + ''; + + fixupPhase = '' + makeWrapper "${python3Packages.python.interpreter}" "$out/bin/prometheus-tor-exporter" \ + --set PYTHONPATH "$PYTHONPATH" \ + --add-flags "$out/share/prometheus-tor-exporter.py" + ''; + + meta = with lib; { + description = "Prometheus exporter that exposes metrics from a Tor daemon"; + homepage = https://github.com/atx/prometheus-tor_exporter; + license = licenses.mit; + maintainers = with maintainers; [ delroth ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix new file mode 100644 index 000000000000..18fa3f98db23 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "unifi-exporter-${version}"; + version = "0.4.0+git1"; + rev = "9a4e69fdea91dd0033bda4842998d751b40a6130"; + + goPackagePath = "github.com/mdlayher/unifi_exporter"; + + src= fetchFromGitHub { + inherit rev; + owner = "mdlayher"; + repo = "unifi_exporter"; + sha256 = "08zqvwvdqnc301f8jfh7bdvc138szw6xszx884b2v8w2x38w3rmn"; + }; + + meta = with stdenv.lib; { + description = "Prometheus exporter that exposes metrics from a Ubiquiti UniFi Controller and UniFi devices"; + homepage = https://github.com/mdlayher/unifi_exporter; + license = licenses.mit; + maintainers = with maintainers; [ bachp ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter.nix new file mode 100644 index 000000000000..b23270cd8c1e --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter.nix @@ -0,0 +1,34 @@ +# This file was generated by go2nix. +{ lib, buildGoPackage, fetchFromGitHub, makeWrapper, varnish }: + +buildGoPackage rec { + name = "prometheus_varnish_exporter-${version}"; + version = "1.4"; + + goPackagePath = "github.com/jonnenauha/prometheus_varnish_exporter"; + + src = fetchFromGitHub { + owner = "jonnenauha"; + repo = "prometheus_varnish_exporter"; + rev = version; + sha256 = "12gd09858zlhn8gkkchfwxv0ca2r72s18wrsz0agfr8pd1gxqh6j"; + }; + + goDeps = ./varnish-exporter_deps.nix; + + nativeBuildInputs = [ makeWrapper ]; + + postInstall = '' + wrapProgram $bin/bin/prometheus_varnish_exporter \ + --prefix PATH : "${varnish}/bin" + ''; + + doCheck = true; + + meta = { + homepage = https://github.com/jonnenauha/prometheus_varnish_exporter; + description = "Varnish exporter for Prometheus"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ]; + }; +} diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter_deps.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter_deps.nix new file mode 100644 index 000000000000..19ff1e9aa560 --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter_deps.nix @@ -0,0 +1,65 @@ +[ + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3a771d992973f24aa725d07868b467d1ddfceafb"; + sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "b4deda0973fb4c70b50d226b1af49f3da59f5265"; + sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "82f5ff156b29e276022b1a958f7d385870fb9814"; + sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "d811d2e9bf898806ecfb6ef6296774b13ffc314c"; + sha256 = "0r4067r4ysmljksqw3awcxx5qplqhykahc5igdzgkky7i4bvaik1"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e"; + sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf"; + }; + } +] |