forked from mirrors/nixpkgs
prom2json: extracted from goPackages
This commit is contained in:
parent
a95e0b9385
commit
4bf5a93f2d
|
@ -427,8 +427,8 @@
|
|||
"fetch": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/prometheus/client_golang",
|
||||
"rev": "90c15b5efa0dc32a7d259234e02ac9a99e6d3b82",
|
||||
"sha256": "11hbll3x7hm69a7b0pwnhz5diligjy5yykdkqz2rsvs8s1k796zm"
|
||||
"rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
|
||||
"sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
28
pkgs/servers/monitoring/prometheus/prom2json.nix
Normal file
28
pkgs/servers/monitoring/prometheus/prom2json.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "prom2json-${version}";
|
||||
version = "0.1.0";
|
||||
rev = "${version}";
|
||||
|
||||
goPackagePath = "github.com/prometheus/prom2json";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/prometheus/prom2json";
|
||||
sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl";
|
||||
};
|
||||
|
||||
goDeps = ./prom2json_deps.json;
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
11
pkgs/servers/monitoring/prometheus/prom2json_deps.json
Normal file
11
pkgs/servers/monitoring/prometheus/prom2json_deps.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
[
|
||||
{
|
||||
"include": "../../libs.json",
|
||||
"packages": [
|
||||
"github.com/golang/protobuf",
|
||||
"github.com/matttproud/golang_protobuf_extensions",
|
||||
"github.com/prometheus/client_golang",
|
||||
"github.com/prometheus/client_model"
|
||||
]
|
||||
}
|
||||
]
|
|
@ -10177,7 +10177,7 @@ in
|
|||
|
||||
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
|
||||
|
||||
prom2json = goPackages.prometheus.prom2json.bin // { outputs = [ "bin" ]; };
|
||||
prom2json = callPackage ../servers/monitoring/prometheus/prom2json.nix { };
|
||||
prometheus = callPackage ../servers/monitoring/prometheus { };
|
||||
prometheus-alertmanager = goPackages.prometheus.alertmanager.bin // { outputs = [ "bin" ]; };
|
||||
prometheus-cli = goPackages.prometheus.cli.bin // { outputs = [ "bin" ]; };
|
||||
|
|
|
@ -2767,27 +2767,6 @@ let
|
|||
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.pushgateway = buildFromGitHub rec {
|
||||
rev = "0.1.1";
|
||||
owner = "prometheus";
|
||||
|
|
Loading…
Reference in a new issue