summary refs log tree commit diff
path: root/pkgs/servers/monitoring
diff options
context:
space:
mode:
authorJaka Hudoklin <offlinehacker@users.noreply.github.com>2018-07-11 21:17:09 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-07-11 21:17:09 +0200
commit6cc50b144af2a6b90da60775e9c583ae954affb5 (patch)
treede101aab04474c4eed712414e2d23bff234c9223 /pkgs/servers/monitoring
parent1dd67f1aef124b2f98fd5b584690ccb02ae58d3e (diff)
downloadnixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.tar
nixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.tar.gz
nixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.tar.bz2
nixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.tar.lz
nixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.tar.xz
nixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.tar.zst
nixpkgs-6cc50b144af2a6b90da60775e9c583ae954affb5.zip
prometheus-jmx-httpserver: init at 0.10 (#43336)
prometheus-jmx-httpserver: init at 0.10
Diffstat (limited to 'pkgs/servers/monitoring')
-rw-r--r--pkgs/servers/monitoring/prometheus/jmx-httpserver.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix b/pkgs/servers/monitoring/prometheus/jmx-httpserver.nix
new file mode 100644
index 00000000000..ca1dc83e96a
--- /dev/null
+++ b/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;
+  };
+}