git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #102271 from symphorien/check-systemd

check_systemd: init at 2.2.1

commit0677e4efbfa23973c1e1ca97623f74cb38f92e97 authorSandro <sandro.jaeckel@gmail.com> dateThu 26 Nov 2020, 02:56 (6 years ago) parent6e0a7bf590aa37
4 files changed+38−23
pkgs/servers/monitoring/nagios/plugins/check_systemd.nix+36 pkgs/servers/monitoring/nagios/plugins/pynagsystemd.nix−22 pkgs/top-level/aliases.nix+1 pkgs/top-level/all-packages.nix+1−1
pkgs/servers/monitoring/nagios/plugins/check_systemd.nixnew file+36
@@ -0,0 +1,36 @@
1+{ fetchFromGitHub, python3Packages, lib }:
2+
3+python3Packages.buildPythonApplication rec {
4+ pname = "check_systemd";
5+ version = "2.2.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "Josef-Friedrich";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "04r14dhqzrdndn235dvr6afy4s4g4asynsgvj99cmyq55nah4asn";
12+ };
13+
14+ propagatedBuildInputs = with python3Packages; [ nagiosplugin ];
15+
16+ postInstall = ''
17+ # check_systemd is only a broken stub calling check_systemd.py
18+ mv $out/bin/check_systemd{.py,}
19+ '';
20+
21+ # the test scripts run ./check_systemd.py and check_systemd. Patch to
22+ # the installed, patchShebanged executable in $out/bin
23+ preCheck = ''
24+ find test -name "*.py" -execdir sed -i "s@./check_systemd.py@$out/bin/check_systemd@" '{}' ";"
25+ export PATH=$PATH:$out/bin
26+ '';
27+ checkInputs = [ python3Packages.pytestCheckHook ];
28+
29+ meta = with lib; {
30+ description = "Nagios / Icinga monitoring plugin to check systemd for failed units";
31+ inherit (src.meta) homepage;
32+ maintainers = with maintainers; [ symphorien ];
33+ license = licenses.lgpl2Only;
34+ platforms = platforms.linux;
35+ };
36+}
pkgs/servers/monitoring/nagios/plugins/pynagsystemd.nixdeleted−22
@@ -1,22 +0,0 @@
1−{ fetchFromGitHub, python3Packages, lib }:
2−
3−python3Packages.buildPythonApplication rec {
4− pname = "pynagsystemd";
5− version = "1.2.0";
6−
7− src = fetchFromGitHub {
8− owner = "kbytesys";
9− repo = pname;
10− rev = "v${version}";
11− sha256 = "1xjhkhdpmqa7ngcpcfhrkmj4cid2wla3fzgr04wvw672ysffv2vz";
12− };
13−
14− propagatedBuildInputs = with python3Packages; [ nagiosplugin ];
15−
16− meta = with lib; {
17− description = "Simple and easy nagios check for systemd status";
18− homepage = "https://github.com/kbytesys/pynagsystemd";
19− maintainers = with maintainers; [ symphorien ];
20− license = licenses.gpl2;
21− };
22−}
pkgs/top-level/aliases.nix+1
@@ -470,6 +470,7 @@ mapAliases ({
470470 phonon-backend-gstreamer = throw "phonon-backend-gstreamer: Please use libsForQt5.phonon-backend-gstreamer, as Qt4 support in this package has been removed."; # added 2019-11-22
471471 phonon-backend-vlc = throw "phonon-backend-vlc: Please use libsForQt5.phonon-backend-vlc, as Qt4 support in this package has been removed."; # added 2019-11-22
472472 phonon = throw "phonon: Please use libsForQt5.phonon, as Qt4 support in this package has been removed."; # added 2019-11-22
473+ pynagsystemd = throw "pynagsystemd was removed as it was unmaintained and incompatible with recent systemd versions. Instead use its fork check_systemd."; # added 2020-10-24
473474 qca-qt5 = libsForQt5.qca-qt5; # added 2015-12-19
474475 qcsxcad = libsForQt5.qcsxcad; # added 2020-11-05
475476 quake3game = ioquake3; # added 2016-01-14
pkgs/top-level/all-packages.nix+1−1
@@ -17302,7 +17302,7 @@ in
1730217302
1730317303 checkSSLCert = callPackage ../servers/monitoring/nagios/plugins/check_ssl_cert.nix { };
1730417304
17305− pynagsystemd = callPackage ../servers/monitoring/nagios/plugins/pynagsystemd.nix { };
17305+ check_systemd = callPackage ../servers/monitoring/nagios/plugins/check_systemd.nix { };
1730617306
1730717307 neo4j = callPackage ../servers/nosql/neo4j { };
1730817308