prom2json: fold into go-packages.nix
This commit is contained in:
parent
853602fae5
commit
fe5a2b0a39
3 changed files with 22 additions and 32 deletions
|
@ -1,30 +0,0 @@
|
||||||
{ goPackages, lib, fetchFromGitHub }:
|
|
||||||
|
|
||||||
let self = goPackages.buildGoPackage rec {
|
|
||||||
name = "prom2json-${rev}";
|
|
||||||
rev = "0.1.0";
|
|
||||||
goPackagePath = "github.com/prometheus/prom2json";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "prometheus";
|
|
||||||
repo = "prom2json";
|
|
||||||
inherit rev;
|
|
||||||
sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = with goPackages; [
|
|
||||||
golang_protobuf_extensions
|
|
||||||
prometheus.client_golang
|
|
||||||
protobuf
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
in self.bin
|
|
|
@ -9196,8 +9196,7 @@ let
|
||||||
|
|
||||||
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
|
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
|
||||||
|
|
||||||
prom2json = callPackage ../servers/monitoring/prometheus/prom2json { };
|
prom2json = goPackages.prometheus.prom2json.bin;
|
||||||
|
|
||||||
prometheus = goPackages.prometheus.prometheus.bin;
|
prometheus = goPackages.prometheus.prometheus.bin;
|
||||||
prometheus-alertmanager = goPackages.prometheus.alertmanager.bin;
|
prometheus-alertmanager = goPackages.prometheus.alertmanager.bin;
|
||||||
prometheus-cli = goPackages.prometheus.cli.bin;
|
prometheus-cli = goPackages.prometheus.cli.bin;
|
||||||
|
|
|
@ -2056,6 +2056,27 @@ let
|
||||||
sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r";
|
sha256 = "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
prometheus.prom2json = buildFromGitHub {
|
||||||
|
rev = "0.1.0";
|
||||||
|
owner = "prometheus";
|
||||||
|
repo = "prom2json";
|
||||||
|
sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl";
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
golang_protobuf_extensions
|
||||||
|
prometheus.client_golang
|
||||||
|
protobuf
|
||||||
|
];
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
prometheus.prometheus = buildGoPackage rec {
|
prometheus.prometheus = buildGoPackage rec {
|
||||||
name = "prometheus-${version}";
|
name = "prometheus-${version}";
|
||||||
version = "0.15.1";
|
version = "0.15.1";
|
||||||
|
|
Loading…
Reference in a new issue