about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/monitoring/prometheus/nats-exporter.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/prometheus/nats-exporter.nix')
-rw-r--r--nixpkgs/pkgs/servers/monitoring/prometheus/nats-exporter.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/nats-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/nats-exporter.nix
new file mode 100644
index 000000000000..b9b4fcc71f43
--- /dev/null
+++ b/nixpkgs/pkgs/servers/monitoring/prometheus/nats-exporter.nix
@@ -0,0 +1,27 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "prometheus-nats-exporter";
+  version = "0.14.0";
+
+  src = fetchFromGitHub {
+    owner = "nats-io";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Zg4zmb0tvu7JPv9XS5Qd5o/ClnODSPz36isjUbFM1ec=";
+  };
+
+  vendorHash = "sha256-VygRE6YviSSIYpMbTEPndR6WUmLAZDwgvuJcwBuizck=";
+
+  preCheck = ''
+    # Fix `insecure algorithm SHA1-RSA` problem
+    export GODEBUG=x509sha1=1;
+  '';
+
+  meta = with lib; {
+    description = "Exporter for NATS metrics";
+    homepage = "https://github.com/nats-io/prometheus-nats-exporter";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ bbigras ];
+  };
+}