check-nwc-health and check-ups-health: init at 20170804

+75
+72
pkgs/servers/monitoring/plugins/labs_consol_de.nix
··· 1 + { stdenv, fetchFromGitHub, buildPerlPackage, autoreconfHook, makeWrapper 2 + , perl, NetSNMP, coreutils, gnused, gnugrep }: 3 + 4 + let 5 + owner = "lausser"; 6 + 7 + glplugin = fetchFromGitHub { 8 + repo = "GLPlugin"; 9 + rev = "b92a261ca4bf84e5b20d3025cc9a31ade03c474b"; 10 + sha256 = "0kflnmpjmklq8fy2vf2h8qyvaiznymdi09z2h5qscrfi51xc9gmh"; 11 + inherit owner; 12 + }; 13 + 14 + generic = { pname, version, rev, sha256, description, ... } @ attrs: 15 + let 16 + attrs' = builtins.removeAttrs attrs [ "pname" "version" "rev" "sha256"]; 17 + in perl.stdenv.mkDerivation rec { 18 + name = stdenv.lib.replaceStrings [ "-" ] [ "_" ] "${pname}-${version}"; 19 + 20 + src = fetchFromGitHub { 21 + repo = pname; 22 + inherit owner rev sha256; 23 + }; 24 + 25 + buildInputs = [ perl NetSNMP ]; 26 + 27 + nativeBuildInputs = [ autoreconfHook makeWrapper ]; 28 + 29 + prePatch = with stdenv.lib; '' 30 + ln -s ${glplugin}/* GLPlugin 31 + substituteInPlace plugins-scripts/Makefile.am \ 32 + --replace /bin/cat ${getBin coreutils}/bin/cat \ 33 + --replace /bin/echo ${getBin coreutils}/bin/echo \ 34 + --replace /bin/grep ${getBin gnugrep}/bin/grep \ 35 + --replace /bin/sed ${getBin gnused}/bin/sed 36 + ''; 37 + 38 + postInstall = '' 39 + test -d $out/libexec && ln -sr $out/libexec $out/bin 40 + ''; 41 + 42 + postFixup = '' 43 + for f in $out/bin/* ; do 44 + wrapProgram $f --prefix PERL5LIB : $PERL5LIB 45 + done 46 + ''; 47 + 48 + meta = with stdenv.lib; { 49 + homepage = https://labs.consol.de/; 50 + license = licenses.gpl2; 51 + maintainer = with maintainers; [ peterhoeg ]; 52 + inherit description; 53 + }; 54 + }; 55 + 56 + in { 57 + check-nwc-health = generic { 58 + pname = "check_nwc_health"; 59 + version = "20170804"; 60 + rev = "e959b412b5cf027c82a446668e026214fdcf8df3"; 61 + sha256 = "11l74xw62g15rqrbf9ff2bfd5iw159gwhhgbkxwdqi8sp9j6navk"; 62 + description = "Check plugin for network equipment."; 63 + }; 64 + 65 + check-ups-health = generic { 66 + pname = "check_ups_health"; 67 + version = "20170804"; 68 + rev = "32a8a359ea46ec0d6f3b7aea19ddedaad63b04b9"; 69 + sha256 = "05na48dxfxrg0i9185j1ck2795p0rw1zwcs8ra0f14cm0qw0lp4l"; 70 + description = "Check plugin for UPSs."; 71 + }; 72 + }
+3
pkgs/top-level/all-packages.nix
··· 11340 11340 munin = callPackage ../servers/monitoring/munin { }; 11341 11341 11342 11342 nagiosPluginsOfficial = callPackage ../servers/monitoring/nagios/plugins/official-2.x.nix { }; 11343 + inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { inherit (perlPackages) NetSNMP; }) 11344 + check-nwc-health 11345 + check-ups-health; 11343 11346 11344 11347 neo4j = callPackage ../servers/nosql/neo4j { }; 11345 11348