nagiosPlugins: init from pkgs/servers/monitoring/nagios/plugins (#298757)
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "check-esxi-hardware";
|
||||
version = "20221230";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Napsty";
|
||||
repo = "check_esxi_hardware";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-u0LklUrzj92mzSzD61C/lxA37bx6nWlRzE1+1fcTL14=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
pywbem
|
||||
requests
|
||||
setuptools
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 check_esxi_hardware.py $out/bin/check_esxi_hardware
|
||||
install -Dm644 -t $out/share/doc/${pname} README.md
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Napsty/check_esxi_hardware";
|
||||
changelog = "https://github.com/Napsty/check_esxi_hardware/releases/tag/${version}";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
mainProgram = "check_esxi_hardware";
|
||||
maintainers = with lib.maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
+8
-4
@@ -1,4 +1,8 @@
|
||||
{ lib, fetchFromGitHub, python3Packages }:
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "check-openvpn";
|
||||
@@ -14,10 +18,10 @@ python3Packages.buildPythonApplication rec {
|
||||
# no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Nagios/icinga/sensu check plugin for OpenVPN";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "check_openvpn";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
maintainers = with lib.maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
+14
-13
@@ -1,18 +1,19 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, smartmontools
|
||||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
python3,
|
||||
smartmontools,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "check_smartmon";
|
||||
pname = "check-smartmon";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "driehuis";
|
||||
repo = "Nagios_check_smartmon";
|
||||
rev = version;
|
||||
owner = "driehuis";
|
||||
repo = "Nagios_check_smartmon";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "tiIeFiHdDgqoeznk9XdCE7owIMnnsQ0fmtj8foFoUD8=";
|
||||
};
|
||||
|
||||
@@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||
postPatch = ''
|
||||
patchShebangs check_smartmon.py
|
||||
substituteInPlace check_smartmon.py \
|
||||
--replace '"/usr/sbin/smartctl"' '"${smartmontools}/bin/smartctl"'
|
||||
--replace-fail '"/usr/sbin/smartctl"' '"${smartmontools}/bin/smartctl"'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
@@ -33,11 +34,11 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Nagios-Plugin that uses smartmontools to check disk health status and temperature";
|
||||
mainProgram = "check_smartmon";
|
||||
homepage = "https://github.com/driehuis/Nagios_check_smartmon";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ mariaa144 ];
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ mariaa144 ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
bc,
|
||||
bind,
|
||||
coreutils,
|
||||
curl,
|
||||
fetchFromGitHub,
|
||||
file,
|
||||
iproute2,
|
||||
lib,
|
||||
makeWrapper,
|
||||
netcat-gnu,
|
||||
nmap,
|
||||
openssl,
|
||||
python3,
|
||||
stdenv,
|
||||
which,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "check_ssl_cert";
|
||||
version = "2.84.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matteocorti";
|
||||
repo = "check_ssl_cert";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-HVif2pjVumrf2YFSHbNiL9pfXy8XNeXHRgaIlx/Tzds=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
makeFlags = [
|
||||
"DESTDIR=$(out)/bin"
|
||||
"MANDIR=$(out)/share/man"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/check_ssl_cert \
|
||||
--prefix PATH : "${
|
||||
lib.makeBinPath (
|
||||
[
|
||||
bc
|
||||
bind # host and dig binary
|
||||
coreutils # date and timeout binary
|
||||
curl
|
||||
file
|
||||
netcat-gnu
|
||||
nmap
|
||||
openssl
|
||||
python3
|
||||
which
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isLinux iproute2
|
||||
)
|
||||
}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/matteocorti/check_ssl_cert/releases/tag/v${version}";
|
||||
description = "Nagios plugin to check the CA and validity of an X.509 certificate";
|
||||
homepage = "https://github.com/matteocorti/check_ssl_cert";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
mainProgram = "check_ssl_cert";
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "check-systemd";
|
||||
version = "4.1.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Josef-Friedrich";
|
||||
repo = "check_systemd";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-1e1WtWRTmOxozuOP2ndfsozuiy9LCT/Lsvb+yKH+8eY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tests/test_argparse.py \
|
||||
--replace-fail "./check_systemd.py" "check_systemd"
|
||||
'';
|
||||
|
||||
build-system = with python3Packages; [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
nagiosplugin
|
||||
];
|
||||
|
||||
# needs to be able to run check_systemd from PATH
|
||||
preCheck = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
'';
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/Josef-Friedrich/check_systemd/releases";
|
||||
description = "Nagios / Icinga monitoring plugin to check systemd for failed units";
|
||||
homepage = "https://github.com/Josef-Friedrich/check_systemd";
|
||||
license = lib.licenses.lgpl2Only;
|
||||
mainProgram = "check_systemd";
|
||||
maintainers = with lib.maintainers; [ symphorien ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
autoreconfHook,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "check-uptime";
|
||||
version = "unstable-2016-11-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "madrisan";
|
||||
repo = "nagios-plugins-uptime";
|
||||
rev = "51822dacd1d404b3eabf3b4984c64b2475ed6f3b";
|
||||
hash = "sha256-0zOvaVWCFKlbblGyObir1QI0cU186J6y1+0ki/+KCaM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
ln -sr $out/libexec $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Uptime check plugin for Sensu/Nagios/others";
|
||||
homepage = "https://github.com/madrisan/nagios-plugins-uptime";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
mainProgram = "check_uptime";
|
||||
maintainers = with lib.maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
+52
-23
@@ -1,34 +1,62 @@
|
||||
{ lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages, txt2man
|
||||
, monitoring-plugins
|
||||
, wmic-bin ? null }:
|
||||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
makeWrapper,
|
||||
monitoring-plugins,
|
||||
perlPackages,
|
||||
stdenv,
|
||||
txt2man,
|
||||
wmic-bin ? null,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "check-wmiplus";
|
||||
pname = "check-wmi-plus";
|
||||
version = "1.65";
|
||||
|
||||
# We fetch from github.com instead of the proper upstream as nix-build errors
|
||||
# out with 406 when trying to fetch the sources
|
||||
# Upstream has been moved from Github to tarballs on the author's website.
|
||||
# See https://edcint.co.nz/checkwmiplus/releases/
|
||||
src = fetchFromGitHub {
|
||||
owner = "speartail";
|
||||
repo = "checkwmiplus";
|
||||
rev = "v${version}";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "1as0iyhy4flpm37mb7lvah7rnd6ax88appjm1icwhy7iq03wi8pl";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./wmiplus_fix_manpage.patch
|
||||
];
|
||||
patches = [ ./wmiplus_fix_manpage.patch ];
|
||||
|
||||
propagatedBuildInputs = with perlPackages; [
|
||||
BHooksEndOfScope ClassDataInheritable ClassInspector ClassSingleton
|
||||
ConfigIniFiles DateTime DateTimeLocale DateTimeTimeZone DevelStackTrace
|
||||
EvalClosure ExceptionClass FileShareDir ModuleImplementation ModuleRuntime
|
||||
MROCompat namespaceautoclean namespaceclean NumberFormat PackageStash
|
||||
ParamsValidate ParamsValidationCompiler RoleTiny Specio
|
||||
SubExporterProgressive SubIdentify TryTiny
|
||||
BHooksEndOfScope
|
||||
ClassDataInheritable
|
||||
ClassInspector
|
||||
ClassSingleton
|
||||
ConfigIniFiles
|
||||
DateTime
|
||||
DateTimeLocale
|
||||
DateTimeTimeZone
|
||||
DevelStackTrace
|
||||
EvalClosure
|
||||
ExceptionClass
|
||||
FileShareDir
|
||||
ModuleImplementation
|
||||
ModuleRuntime
|
||||
MROCompat
|
||||
namespaceautoclean
|
||||
namespaceclean
|
||||
NumberFormat
|
||||
PackageStash
|
||||
ParamsValidate
|
||||
ParamsValidationCompiler
|
||||
RoleTiny
|
||||
Specio
|
||||
SubExporterProgressive
|
||||
SubIdentify
|
||||
TryTiny
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper txt2man ];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
txt2man
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
@@ -36,11 +64,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace check_wmi_plus.pl \
|
||||
--replace /usr/bin/wmic ${wmic-bin}/bin/wmic \
|
||||
--replace /etc/check_wmi_plus $out/etc/check_wmi_plus \
|
||||
--replace /opt/nagios/bin/plugins $out/etc/check_wmi_plus \
|
||||
--replace /usr/lib/nagios/plugins ${monitoring-plugins}/libexec \
|
||||
--replace '$base_dir/check_wmi_plus_help.pl' "$out/bin/check_wmi_plus_help.pl"
|
||||
--replace-fail /usr/bin/wmic ${wmic-bin}/bin/wmic \
|
||||
--replace-fail /etc/check_wmi_plus $out/etc/check_wmi_plus \
|
||||
--replace-fail /opt/nagios/bin/plugins $out/etc/check_wmi_plus \
|
||||
--replace-fail /usr/lib/nagios/plugins ${monitoring-plugins}/libexec \
|
||||
--replace-fail '$base_dir/check_wmi_plus_help.pl' "$out/bin/check_wmi_plus_help.pl"
|
||||
|
||||
for f in *.pl ; do
|
||||
substituteInPlace $f --replace /usr/bin/perl ${perlPackages.perl}/bin/perl
|
||||
@@ -70,8 +98,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "Sensu/nagios plugin using WMI to query Windows hosts";
|
||||
homepage = "http://edcint.co.nz/checkwmiplus";
|
||||
homepage = "https://edcint.co.nz/checkwmiplus/";
|
||||
license = licenses.gpl2Plus;
|
||||
mainProgram = "check_wmi_plus";
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
+20
-16
@@ -1,30 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, zfs
|
||||
, sudo
|
||||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
python3,
|
||||
stdenv,
|
||||
sudo,
|
||||
zfs,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "check_zfs";
|
||||
pname = "check-zfs";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zlacelle";
|
||||
repo = "nagios_check_zfs_linux";
|
||||
rev = version;
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "gPLCNt6hp4E94s9/PRgsnBN5XXQQ+s2MGcgRFeknXg4=";
|
||||
};
|
||||
|
||||
buildInputs = [ python3 zfs sudo ];
|
||||
buildInputs = [
|
||||
python3
|
||||
zfs
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs check_zfs.py
|
||||
substituteInPlace check_zfs.py \
|
||||
--replace "'/usr/bin/sudo'" "'${sudo}/bin/sudo'" \
|
||||
--replace "'/sbin/zpool'" "'${zfs}/bin/zpool'" \
|
||||
--replace "'/sbin/zfs'" "'${zfs}/bin/zfs'"
|
||||
--replace-fail "'/usr/bin/sudo'" "'${sudo}/bin/sudo'" \
|
||||
--replace-fail "'/sbin/zpool'" "'${zfs}/bin/zpool'" \
|
||||
--replace-fail "'/sbin/zfs'" "'${zfs}/bin/zfs'"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
@@ -35,11 +39,11 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Check the health, capacity, fragmentation, and other things for use with Nagios monitoring";
|
||||
mainProgram = "check_zfs";
|
||||
homepage = "https://github.com/zlacelle/nagios_check_zfs_linux";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ mariaa144 ];
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "check_zfs";
|
||||
maintainers = with lib.maintainers; [ mariaa144 ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ newScope, pkgs }:
|
||||
|
||||
let
|
||||
callPackage = newScope (pkgs // plugins);
|
||||
plugins = import ./plugins.nix { inherit callPackage; };
|
||||
in
|
||||
plugins
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
autoreconfHook,
|
||||
coreutils,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
gnugrep,
|
||||
gnused,
|
||||
lib,
|
||||
makeWrapper,
|
||||
perlPackages,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
let
|
||||
glplugin = fetchFromGitHub {
|
||||
owner = "lausser";
|
||||
repo = "GLPlugin";
|
||||
rev = "ef3107f01afe55fad5452e64ac5bbea00b18a8d5";
|
||||
sha256 = "047fwrycsl2vmpi4wl46fs6f8y191d6qc9ms5rvmrj1dm2r828ws";
|
||||
};
|
||||
|
||||
generic =
|
||||
{
|
||||
pname,
|
||||
version,
|
||||
sha256,
|
||||
description,
|
||||
buildInputs,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://labs.consol.de/assets/downloads/nagios/${pname}-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ perlPackages.perl ] ++ buildInputs;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
rm -rf GLPlugin
|
||||
ln -s ${glplugin} GLPlugin
|
||||
substituteInPlace plugins-scripts/Makefile.am \
|
||||
--replace-fail /bin/cat ${lib.getExe' coreutils "cat"} \
|
||||
--replace-fail /bin/echo ${lib.getExe' coreutils "echo"} \
|
||||
--replace-fail /bin/grep ${lib.getExe gnugrep} \
|
||||
--replace-fail /bin/sed ${lib.getExe gnused}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
if [[ -d $out/libexec ]]; then
|
||||
ln -sr $out/libexec $out/bin
|
||||
fi
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for f in $out/bin/* ; do
|
||||
wrapProgram $f --prefix PERL5LIB : $PERL5LIB
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://labs.consol.de/";
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = with lib.maintainers; [ peterhoeg ];
|
||||
inherit description;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
check_mssql_health = generic {
|
||||
pname = "check-mssql-health";
|
||||
version = "2.6.4.15";
|
||||
sha256 = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg";
|
||||
description = "Check plugin for Microsoft SQL Server";
|
||||
buildInputs = [ perlPackages.DBDsybase ];
|
||||
};
|
||||
|
||||
check_nwc_health = generic {
|
||||
pname = "check-nwc-health";
|
||||
version = "7.10.0.6";
|
||||
sha256 = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2";
|
||||
description = "Check plugin for network equipment";
|
||||
buildInputs = [ perlPackages.NetSNMP ];
|
||||
};
|
||||
|
||||
check_ups_health = generic {
|
||||
pname = "check-ups-health";
|
||||
version = "2.8.3.3";
|
||||
sha256 = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm";
|
||||
description = "Check plugin for UPSs";
|
||||
buildInputs = [ perlPackages.NetSNMP ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ callPackage }:
|
||||
|
||||
{
|
||||
check_esxi_hardware = callPackage ./check_esxi_hardware { };
|
||||
check_openvpn = callPackage ./check_openvpn { };
|
||||
check_smartmon = callPackage ./check_smartmon { };
|
||||
check_ssl_cert = callPackage ./check_ssl_cert { };
|
||||
check_systemd = callPackage ./check_systemd { };
|
||||
check_uptime = callPackage ./check_uptime { };
|
||||
check_wmi_plus = callPackage ./check_wmi_plus { };
|
||||
check_zfs = callPackage ./check_zfs { };
|
||||
|
||||
inherit (callPackage ./labs_consol_de { }) check_mssql_health check_nwc_health check_ups_health;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, bc
|
||||
, bind # host and dig binary
|
||||
, coreutils # date and timeout binary
|
||||
, curl
|
||||
, fetchFromGitHub
|
||||
, file
|
||||
, iproute2
|
||||
, makeWrapper
|
||||
, netcat-gnu
|
||||
, nmap
|
||||
, openssl
|
||||
, python3
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "check_ssl_cert";
|
||||
version = "2.84.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matteocorti";
|
||||
repo = "check_ssl_cert";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-HVif2pjVumrf2YFSHbNiL9pfXy8XNeXHRgaIlx/Tzds=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"DESTDIR=$(out)/bin"
|
||||
"MANDIR=$(out)/share/man"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/check_ssl_cert \
|
||||
--prefix PATH : "${lib.makeBinPath ([ openssl file which curl bc coreutils bind nmap netcat-gnu python3 ] ++ lib.optional stdenv.hostPlatform.isLinux iproute2) }"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Nagios plugin to check the CA and validity of an X.509 certificate";
|
||||
mainProgram = "check_ssl_cert";
|
||||
homepage = "https://github.com/matteocorti/check_ssl_cert";
|
||||
changelog = "https://github.com/matteocorti/check_ssl_cert/releases/tag/v${version}";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{ fetchFromGitHub, python3Packages, lib }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "check_systemd";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Josef-Friedrich";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "11sc0gycxzq1vfvin501jnwnky2ky6ns64yjiw8vq9vmkbf8nni6";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ nagiosplugin ];
|
||||
|
||||
postInstall = ''
|
||||
# check_systemd is only a broken stub calling check_systemd.py
|
||||
mv $out/bin/check_systemd{.py,}
|
||||
'';
|
||||
|
||||
# the test scripts run ./check_systemd.py and check_systemd. Patch to
|
||||
# the installed, patchShebanged executable in $out/bin
|
||||
preCheck = ''
|
||||
find test -name "*.py" -execdir sed -i "s@./check_systemd.py@$out/bin/check_systemd@" '{}' ";"
|
||||
export PATH=$PATH:$out/bin
|
||||
'';
|
||||
nativeCheckInputs = [ python3Packages.pytestCheckHook ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Nagios / Icinga monitoring plugin to check systemd for failed units";
|
||||
mainProgram = "check_systemd";
|
||||
inherit (src.meta) homepage;
|
||||
changelog = "https://github.com/Josef-Friedrich/check_systemd/releases";
|
||||
maintainers = with maintainers; [ symphorien ];
|
||||
license = licenses.lgpl2Only;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{ lib, fetchFromGitHub, python3Packages }:
|
||||
|
||||
let
|
||||
bName = "check_esxi_hardware";
|
||||
|
||||
in python3Packages.buildPythonApplication rec {
|
||||
pname = lib.replaceStrings [ "_" ] [ "-" ] bName;
|
||||
version = "20200710";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Napsty";
|
||||
repo = bName;
|
||||
rev = version;
|
||||
sha256 = "EC6np/01S+5SA2H9z5psJ9Pq/YoEyGdHL9wHUKKsNas=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 ${bName}.py $out/bin/${bName}
|
||||
install -Dm644 -t $out/share/doc/${pname} README.md
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ pywbem requests setuptools ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.claudiokuenzler.com/nagios-plugins/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchurl, autoreconfHook, makeWrapper
|
||||
, perlPackages, coreutils, gnused, gnugrep }:
|
||||
|
||||
let
|
||||
glplugin = fetchFromGitHub {
|
||||
owner = "lausser";
|
||||
repo = "GLPlugin";
|
||||
rev = "ef3107f01afe55fad5452e64ac5bbea00b18a8d5";
|
||||
sha256 = "047fwrycsl2vmpi4wl46fs6f8y191d6qc9ms5rvmrj1dm2r828ws";
|
||||
};
|
||||
|
||||
generic = { pname, version, sha256, description, buildInputs, ... }:
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://labs.consol.de/assets/downloads/nagios/${pname}-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ perlPackages.perl ] ++ buildInputs;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
||||
|
||||
prePatch = ''
|
||||
rm -rf GLPlugin
|
||||
ln -s ${glplugin} GLPlugin
|
||||
substituteInPlace plugins-scripts/Makefile.am \
|
||||
--replace /bin/cat ${lib.getBin coreutils}/bin/cat \
|
||||
--replace /bin/echo ${lib.getBin coreutils}/bin/echo \
|
||||
--replace /bin/grep ${lib.getBin gnugrep}/bin/grep \
|
||||
--replace /bin/sed ${lib.getBin gnused}/bin/sed
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
test -d $out/libexec && ln -sr $out/libexec $out/bin
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for f in $out/bin/* ; do
|
||||
wrapProgram $f --prefix PERL5LIB : $PERL5LIB
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://labs.consol.de/";
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = with lib.maintainers; [ peterhoeg ];
|
||||
inherit description;
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
check-mssql-health = generic {
|
||||
pname = "check_mssql_health";
|
||||
version = "2.6.4.15";
|
||||
sha256 = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg";
|
||||
description = "Check plugin for Microsoft SQL Server";
|
||||
buildInputs = [ perlPackages.DBDsybase ];
|
||||
};
|
||||
|
||||
check-nwc-health = generic {
|
||||
pname = "check_nwc_health";
|
||||
version = "7.10.0.6";
|
||||
sha256 = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2";
|
||||
description = "Check plugin for network equipment";
|
||||
buildInputs = [ perlPackages.NetSNMP ];
|
||||
};
|
||||
|
||||
check-ups-health = generic {
|
||||
pname = "check_ups_health";
|
||||
version = "2.8.3.3";
|
||||
sha256 = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm";
|
||||
description = "Check plugin for UPSs";
|
||||
buildInputs = [ perlPackages.NetSNMP ];
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "check-uptime";
|
||||
version = "20161112";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "madrisan";
|
||||
repo = "nagios-plugins-uptime";
|
||||
rev = "51822dacd1d404b3eabf3b4984c64b2475ed6f3b";
|
||||
sha256 = "18q9ibzqn97dsyr9xs3w9mqk80nmmfw3kcjidrdsj542amlsycyk";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = "ln -sr $out/libexec $out/bin";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Uptime check plugin for Sensu/Nagios/others";
|
||||
homepage = "https://github.com/madrisan/nagios-plugins-uptime";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
@@ -230,6 +230,17 @@ mapAliases {
|
||||
ccloud-cli = throw "ccloud-cli has been removed, please use confluent-cli instead"; # Added 2023-06-09
|
||||
certmgr-selfsigned = certmgr; # Added 2023-11-30
|
||||
challenger = taler-challenger; # Added 2024-09-04
|
||||
check_smartmon = throw "'check_smartmon' has been renamed to 'nagiosPlugins.check_smartmon'"; # Added 2024-05-03
|
||||
check_systemd = throw "'check_systemd' has been renamed to 'nagiosPlugins.check_systemd'"; # Added 2024-05-03
|
||||
check_zfs = throw "'check_zfs' has been renamed to 'nagiosPlugins.check_zfs'"; # Added 2024-05-03
|
||||
check-esxi-hardware = throw "'check-esxi-hardware' has been renamed to 'nagiosPlugins.check_esxi_hardware'"; # Added 2024-05-03
|
||||
check-mssql-health = throw "'check-mssql-health' has been renamed to 'nagiosPlugins.check_mssql_health'"; # Added 2024-05-03
|
||||
check-nwc-health = throw "'check-nwc-health' has been renamed to 'nagiosPlugins.check_nwc_health'"; # Added 2024-05-03
|
||||
check-openvpn = throw "'check-openvpn' has been renamed to 'nagiosPlugins.check_openvpn'"; # Added 2024-05-03
|
||||
check-ups-health = throw "'check-ups-health' has been renamed to 'nagiosPlugins.check_ups_health'"; # Added 2024-05-03
|
||||
check-uptime = throw "'check-uptime' has been renamed to 'nagiosPlugins.check_uptime'"; # Added 2024-05-03
|
||||
check-wmiplus = throw "'check-wmiplus' has been renamed to 'nagiosPlugins.check_wmi_plus'"; # Added 2024-05-03
|
||||
checkSSLCert = throw "'checkSSLCert' has been renamed to 'nagiosPlugins.check_ssl_cert'"; # Added 2024-05-03
|
||||
chefdk = throw "chefdk has been removed due to being deprecated upstream by Chef Workstation"; # Added 2023-03-22
|
||||
chia = throw "chia has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # Added 2023-11-30
|
||||
chia-dev-tools = throw "chia-dev-tools has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # Added 2023-11-30
|
||||
|
||||
@@ -24908,29 +24908,14 @@ with pkgs;
|
||||
|
||||
nagios = callPackage ../servers/monitoring/nagios { };
|
||||
|
||||
nagiosPlugins = callPackages ../servers/monitoring/nagios-plugins { };
|
||||
|
||||
monitoring-plugins = callPackage ../servers/monitoring/plugins { };
|
||||
|
||||
inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { })
|
||||
check-mssql-health
|
||||
check-nwc-health
|
||||
check-ups-health;
|
||||
|
||||
check-openvpn = callPackage ../servers/monitoring/plugins/openvpn.nix { };
|
||||
|
||||
check_smartmon = callPackage ../servers/monitoring/nagios/plugins/smartmon.nix { };
|
||||
|
||||
checkSSLCert = callPackage ../servers/monitoring/nagios/plugins/check_ssl_cert.nix { };
|
||||
|
||||
check_systemd = callPackage ../servers/monitoring/nagios/plugins/check_systemd.nix { };
|
||||
|
||||
check_zfs = callPackage ../servers/monitoring/nagios/plugins/zfs.nix { };
|
||||
|
||||
neo4j = callPackage ../servers/nosql/neo4j { };
|
||||
|
||||
neo4j-desktop = callPackage ../applications/misc/neo4j-desktop { };
|
||||
|
||||
check-esxi-hardware = callPackage ../servers/monitoring/plugins/esxi.nix { };
|
||||
|
||||
net-snmp = callPackage ../servers/monitoring/net-snmp { };
|
||||
|
||||
newrelic-sysmond = callPackage ../servers/monitoring/newrelic-sysmond { };
|
||||
@@ -25221,8 +25206,6 @@ with pkgs;
|
||||
sensu-go-backend
|
||||
sensu-go-cli;
|
||||
|
||||
check-wmiplus = callPackage ../servers/monitoring/plugins/wmiplus { };
|
||||
|
||||
shishi = callPackage ../servers/shishi {
|
||||
pam = if stdenv.hostPlatform.isLinux then pam else null;
|
||||
# see also openssl, which has/had this same trick
|
||||
@@ -38537,9 +38520,7 @@ with pkgs;
|
||||
|
||||
hy = with python3Packages; toPythonApplication hy;
|
||||
|
||||
wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { };
|
||||
|
||||
check-uptime = callPackage ../servers/monitoring/plugins/uptime.nix { };
|
||||
wmic-bin = callPackage ../servers/monitoring/wmic-bin { };
|
||||
|
||||
ghc-standalone-archive = callPackage ../os-specific/darwin/ghc-standalone-archive { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user