diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-07-17 11:33:57 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-25 00:04:28 +0200 |
commit | 17eabf477b035ff4590640ebdfd69ca558437c51 (patch) | |
tree | ce7f4b107f12ffad2ee3a221682779502e392ad3 /pkgs/monitoring-plugins | |
parent | b3244321d6919229a7778f47f61b0df9afee3435 (diff) | |
download | NUR-17eabf477b035ff4590640ebdfd69ca558437c51.tar.gz NUR-17eabf477b035ff4590640ebdfd69ca558437c51.tar.zst NUR-17eabf477b035ff4590640ebdfd69ca558437c51.zip |
Add monitoring modules via naemon
Diffstat (limited to 'pkgs/monitoring-plugins')
-rw-r--r-- | pkgs/monitoring-plugins/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/monitoring-plugins/default.nix b/pkgs/monitoring-plugins/default.nix new file mode 100644 index 00000000..852d29bf --- /dev/null +++ b/pkgs/monitoring-plugins/default.nix | |||
@@ -0,0 +1,33 @@ | |||
1 | { stdenv, iputils, fetchpatch, fetchurl, file, hostname, perl, openssl, | ||
2 | bind, openldap, procps-ng, postfix, | ||
3 | wrapperDir ? "/run/wrappers/bin" | ||
4 | }: | ||
5 | stdenv.mkDerivation rec { | ||
6 | pname = "monitoring-plugins"; | ||
7 | version = "2.2"; | ||
8 | name = "${pname}-${version}"; | ||
9 | |||
10 | src = fetchurl { | ||
11 | url = "https://www.monitoring-plugins.org/download/${name}.tar.gz"; | ||
12 | sha256 = "0r9nvnk64nv7k8w352n99lw4p92pycxd9wlga9zyzjx9027m6si9"; | ||
13 | }; | ||
14 | |||
15 | patches = [ | ||
16 | (fetchpatch { | ||
17 | name = "mariadb.patch"; | ||
18 | url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mariadb.patch?h=packages/monitoring-plugins"; | ||
19 | sha256 = "0jf6fqkyzag66rid92m7asnr2dp8rr8kn4zjvhqg0mqvf8imppky"; | ||
20 | }) | ||
21 | ]; | ||
22 | |||
23 | # ping needs CAP_NET_RAW capability which is set only in the wrappers namespace | ||
24 | configurePhase = '' | ||
25 | ./configure --disable-static --disable-dependency-tracking \ | ||
26 | --prefix=$out \ | ||
27 | --with-ping-command="${wrapperDir}/ping -4 -n -U -w %d -c %d %s" \ | ||
28 | --with-ping6-command="${wrapperDir}/ping -6 -n -U -w %d -c %d %s" \ | ||
29 | --with-sudo-command="${wrapperDir}/sudo" | ||
30 | ''; | ||
31 | |||
32 | buildInputs = [ perl file hostname iputils openssl openldap procps-ng bind.dnsutils postfix ]; | ||
33 | } | ||