about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix
new file mode 100644
index 000000000000..18fa3f98db23
--- /dev/null
+++ b/nixpkgs/pkgs/servers/monitoring/prometheus/unifi-exporter/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "unifi-exporter-${version}";
+  version = "0.4.0+git1";
+  rev = "9a4e69fdea91dd0033bda4842998d751b40a6130";
+
+  goPackagePath = "github.com/mdlayher/unifi_exporter";
+
+  src= fetchFromGitHub {
+    inherit rev;
+    owner = "mdlayher";
+    repo = "unifi_exporter";
+    sha256 = "08zqvwvdqnc301f8jfh7bdvc138szw6xszx884b2v8w2x38w3rmn";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Prometheus exporter that exposes metrics from a Ubiquiti UniFi Controller and UniFi devices";
+    homepage = https://github.com/mdlayher/unifi_exporter;
+    license = licenses.mit;
+    maintainers = with maintainers; [ bachp ];
+    platforms = platforms.unix;
+  };
+}