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> | 2019-07-17 11:33:57 +0200 |
commit | 3bc32d9ebd9b0900eeef756122ad28f8857f8bfe (patch) | |
tree | ff92459e654fde6fe559dfd383d6a76e05a347cf /pkgs/monitoring-plugins | |
parent | e886ea19877fa0d4de32d35939f69e9c18681d59 (diff) | |
download | Nix-3bc32d9ebd9b0900eeef756122ad28f8857f8bfe.tar.gz Nix-3bc32d9ebd9b0900eeef756122ad28f8857f8bfe.tar.zst Nix-3bc32d9ebd9b0900eeef756122ad28f8857f8bfe.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 0000000..852d29b --- /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 | } | ||