prometheus-jmx-httpserver: init at 0.10 (#43336)
prometheus-jmx-httpserver: init at 0.10
This commit is contained in:
parent
1dd67f1aef
commit
6cc50b144a
35
pkgs/servers/monitoring/prometheus/jmx-httpserver.nix
Normal file
35
pkgs/servers/monitoring/prometheus/jmx-httpserver.nix
Normal file
@ -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;
|
||||
};
|
||||
}
|
@ -13102,6 +13102,7 @@ with pkgs;
|
||||
prometheus-surfboard-exporter = callPackage ../servers/monitoring/prometheus/surfboard-exporter.nix { };
|
||||
prometheus-unifi-exporter = callPackage ../servers/monitoring/prometheus/unifi-exporter { };
|
||||
prometheus-varnish-exporter = callPackage ../servers/monitoring/prometheus/varnish-exporter.nix { };
|
||||
prometheus-jmx-httpserver = callPackage ../servers/monitoring/prometheus/jmx-httpserver.nix { };
|
||||
|
||||
psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user