-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nagiosPlugins: init from pkgs/servers/monitoring/nagios/plugins #298757
Changes from all commits
a521fec
bfe3013
1b96b42
96cf86c
1d8986b
e81cfdb
82d261a
7d7546c
548a22d
8595021
6dd98fa
8715f2d
ca12846
5c6326e
d5d83ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,74 @@ | ||
{ 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"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This repository is dead since October 2021, speartail/checkwmiplus@37fa4f9. On a first glance I was unable to find another repository, but tarballs on the author's webpage: https://edcint.co.nz/checkwmiplus/releases/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
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; | ||
doCheck = false; # no checks | ||
|
||
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 ]; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a 0- prefix