From 217adf435e85d91a95913e1870f519f60b08583d Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Fri, 18 Oct 2024 13:51:10 -0500 Subject: [PATCH] openbsd_snmp3_check: init at 0.55 --- .../openbsd_snmp3_check/default.nix | 42 +++++++++++++++++++ .../monitoring/nagios-plugins/plugins.nix | 1 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/servers/monitoring/nagios-plugins/openbsd_snmp3_check/default.nix diff --git a/pkgs/servers/monitoring/nagios-plugins/openbsd_snmp3_check/default.nix b/pkgs/servers/monitoring/nagios-plugins/openbsd_snmp3_check/default.nix new file mode 100644 index 00000000000000..d62d60ccd09ebe --- /dev/null +++ b/pkgs/servers/monitoring/nagios-plugins/openbsd_snmp3_check/default.nix @@ -0,0 +1,42 @@ +{ + fetchFromGitHub, + lib, + nix-update-script, + openbsd_snmp3_check, + python3Packages, + stdenv, + testers, +}: +python3Packages.buildPythonApplication rec { + pname = "openbsd_snmp3_check"; + version = "0.55"; + pyproject = false; + + src = fetchFromGitHub { + owner = "alexander-naumov"; + repo = "openbsd_snmp3_check"; + rev = "v${version}"; + hash = "sha256-qDYANMvQU72f9wz8os7S1PfBH08AAqhtWLHVuSmkub4="; + }; + + installPhase = '' + install -D --mode=0755 openbsd_snmp3.py $out/bin/openbsd_snmp3.py + ''; + + passthru = { + updateScript = nix-update-script { }; + tests.version = testers.testVersion { + package = openbsd_snmp3_check; + }; + }; + + meta = with lib; { + changelog = "https://github.com/alexander-naumov/openbsd_snmp3_check/releases/tag/v${version}"; + description = "SNMP v3 check for OpenBSD systems state monitoring"; + homepage = "https://github.com/alexander-naumov/openbsd_snmp3_check"; + license = with licenses; [ bsd3 ]; + platforms = platforms.unix; + maintainers = with maintainers; [ jwillikers ]; + mainProgram = "openbsd_snmp3.py"; + }; +} diff --git a/pkgs/servers/monitoring/nagios-plugins/plugins.nix b/pkgs/servers/monitoring/nagios-plugins/plugins.nix index c61457de9bd028..d49c914d2a4125 100644 --- a/pkgs/servers/monitoring/nagios-plugins/plugins.nix +++ b/pkgs/servers/monitoring/nagios-plugins/plugins.nix @@ -13,4 +13,5 @@ inherit (callPackage ./labs_consol_de { }) check_mssql_health check_nwc_health check_ups_health; manubulon-snmp-plugins = callPackage ./manubulon-snmp-plugins { }; + openbsd_snmp3_check = callPackage ./openbsd_snmp3_check { }; }