From 79ce805761aa0acedb827141dee46c1ec0b059f4 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 30 Jan 2023 11:06:52 +0100 Subject: [PATCH] prometheus-shelly-exporter: init at 1.0.0 --- .../monitoring/prometheus/shelly-exporter.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 25 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/shelly-exporter.nix diff --git a/pkgs/servers/monitoring/prometheus/shelly-exporter.nix b/pkgs/servers/monitoring/prometheus/shelly-exporter.nix new file mode 100644 index 000000000000..ee8002e66140 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/shelly-exporter.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub, nixosTests }: + +buildGoModule rec { + pname = "shelly_exporter"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "aexel90"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-L0TuBDq5eEahQvzqd1WuvmXuQbbblCM+Nvj15IybnVo="; + }; + + vendorSha256 = "sha256-BCrge2xLT4b4wpYA+zcsH64a/nfV8+HeZF7L49p2gEw="; + + passthru.tests = { inherit (nixosTests.prometheus-exporters) shelly; }; + + meta = with lib; { + description = "Shelly humidity sensor exporter for prometheus"; + homepage = "https://github.com/aexel90/shelly_exporter"; + license = licenses.asl20; + maintainers = with maintainers; [drupol]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c859120680aa..31b0ef716d1c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25016,6 +25016,7 @@ with pkgs; prometheus-rtl_433-exporter = callPackage ../servers/monitoring/prometheus/rtl_433-exporter.nix { }; prometheus-sachet = callPackage ../servers/monitoring/prometheus/sachet.nix { }; prometheus-script-exporter = callPackage ../servers/monitoring/prometheus/script-exporter.nix { }; + prometheus-shelly-exporter = callPackage ../servers/monitoring/prometheus/shelly-exporter.nix { }; prometheus-smartctl-exporter = callPackage ../servers/monitoring/prometheus/smartctl-exporter { }; prometheus-smokeping-prober = callPackage ../servers/monitoring/prometheus/smokeping-prober.nix { }; prometheus-snmp-exporter = callPackage ../servers/monitoring/prometheus/snmp-exporter.nix { };