diff options
Diffstat (limited to 'modules/pkgs/icinga2')
-rw-r--r-- | modules/pkgs/icinga2/check_mysql_slave.patch | 41 | ||||
-rw-r--r-- | modules/pkgs/icinga2/default.nix | 69 |
2 files changed, 0 insertions, 110 deletions
diff --git a/modules/pkgs/icinga2/check_mysql_slave.patch b/modules/pkgs/icinga2/check_mysql_slave.patch deleted file mode 100644 index 0658a8a..0000000 --- a/modules/pkgs/icinga2/check_mysql_slave.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: icinga2-2.4.1/itl/command-plugins.conf -=================================================================== ---- icinga2-2.4.1.orig/itl/command-plugins.conf -+++ icinga2-2.4.1/itl/command-plugins.conf -@@ -1775,6 +1775,36 @@ object CheckCommand "mysql" { - vars.mysql_hostname = "$check_address$" - } - -+object CheckCommand "mysql_slave" { -+ import "plugin-check-command" -+ import "ipv4-or-ipv6" -+ -+ command = [ PluginDir + "/check_mysql_slave" ] -+ -+ arguments = { -+ "-H" = "$mysql_hostname$" -+ "-P" = "$mysql_port$" -+ "-s" = "$mysql_socket$" -+ "-f" = "$mysql_file$" -+ "-g" = "$mysql_group$" -+ "-u" = "$mysql_username$" -+ "-p" = "$mysql_password$" -+ "-N" = "$mysql_connection_name$" -+ "-w" = "$mysql_warning$" -+ "-c" = "$mysql_critical$" -+ "-l" = { -+ set_if = "$mysql_ssl$" -+ } -+ "-C" = "$mysql_cacert$" -+ "-a" = "$mysql_cert$" -+ "-k" = "$mysql_key$" -+ "-D" = "$mysql_cadir$" -+ "-L" = "$mysql_ciphers$" -+ } -+ -+ vars.mysql_hostname = "$check_address$" -+} -+ - object CheckCommand "negate" { - import "plugin-check-command" - diff --git a/modules/pkgs/icinga2/default.nix b/modules/pkgs/icinga2/default.nix deleted file mode 100644 index 9805ca4..0000000 --- a/modules/pkgs/icinga2/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ stdenv, fetchurl -, bison, boost, cmake, flex -, libedit, mariadb, postgresql -, openssl, yajl, pkgconfig -, makeWrapper -}: - -stdenv.mkDerivation rec { - version = "2.10.1"; - name = "icinga2-${version}"; - - src = fetchurl { - url = "https://github.com/Icinga/icinga2/archive/v${version}.tar.gz"; - sha256 = "0hwpf080w7y4lhw7fl71npf2dscnqnccsii1iqibqb46g3cxqalk"; - }; - - buildInputs = [ - bison boost cmake flex libedit makeWrapper mariadb.client openssl - pkgconfig postgresql yajl - ]; - - patches = [ - ./check_mysql_slave.patch - ]; - - cmakeFlags = [ - "-DCMAKE_INSTALL_LOCALSTATEDIR=/icinga2" - "-DCMAKE_INSTALL_SYSCONFDIR=/icinga2/etc" # this will need runtime support - "-DICINGA2_COMMAND_GROUP=icingacmd" - "-DICINGA2_GROUP=icinga" - "-DICINGA2_RUNDIR=/run" - "-DICINGA2_USER=icinga" - "-DMYSQL_INCLUDE_DIR=${mariadb.client.dev}/include/mysql" - ]; - - # XXX Without DESTDIR it tries to write to /icinga2 and /run: - installPhase = '' - rm -rf tmp - mkdir -p tmp - make install DESTDIR=$(pwd)/tmp - mv -v tmp/$out $out - mv -v tmp/icinga2 $out/icinga2 - - rm -rvf \ - $out/icinga2/cache \ - $out/icinga2/etc/icinga2/features-enabled \ - $out/icinga2/etc/init.d \ - $out/icinga2/etc/logrotate.d \ - $out/icinga2/log \ - $out/icinga2/spool \ - $out/run \ - $out/share/doc/icinga2/markdown - - for s in $out/icinga2/etc/icinga2/scripts/* ; do - substituteInPlace $s --replace /usr/bin/printf printf - done - - wrapProgram $out/lib/icinga2/sbin/icinga2 \ - --prefix LD_LIBRARY_PATH : $out/lib/icinga2 - - rm -vf $out/sbin/icinga2 - ln -svf $out/lib/icinga2/sbin/icinga2 $out/sbin/icinga2 - test -x $out/sbin/icinga2 - ''; - - buildPhase = '' - make VERBOSE=1 - ''; -} |