diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-09-29 13:51:44 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-09-29 13:51:44 +0300 |
commit | 62f28d30a069135f9c48678507203958adfc334f (patch) | |
tree | 7f38af0c8d3f445ee8cc50906a639baec7011127 /pkgs/icinga2 | |
parent | 1af9e6589bdd18e6ba7eeabf073aa7d710020cdd (diff) | |
download | nixsap-62f28d30a069135f9c48678507203958adfc334f.tar.gz |
Moved everything into ./modules
Diffstat (limited to 'pkgs/icinga2')
-rw-r--r-- | pkgs/icinga2/check_mysql_slave.patch | 41 | ||||
-rw-r--r-- | pkgs/icinga2/default.nix | 45 |
2 files changed, 0 insertions, 86 deletions
diff --git a/pkgs/icinga2/check_mysql_slave.patch b/pkgs/icinga2/check_mysql_slave.patch deleted file mode 100644 index 0658a8a..0000000 --- a/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/pkgs/icinga2/default.nix b/pkgs/icinga2/default.nix deleted file mode 100644 index 5429a51..0000000 --- a/pkgs/icinga2/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ stdenv, fetchurl -, bison, boost, cmake, flex -, libedit, mysql, openssl, yajl -}: - -stdenv.mkDerivation rec { - version = "2.4.10"; - name = "icinga2-${version}"; - - src = fetchurl { - url = "https://github.com/Icinga/icinga2/archive/v${version}.tar.gz"; - sha256 = "0pj2y24kgf17106903lnz9gmp5hb3irhafq8sp22qf1wa0q395n2"; - }; - - buildInputs = [ bison boost cmake flex libedit openssl 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" - "-DICINGA2_WITH_PGSQL=OFF" - "-DMYSQL_INCLUDE_DIR=${mysql.lib}/include/mysql" - "-DMYSQL_LIB_DIR=${mysql.lib}/lib" - ]; - - # XXX Without DESTDIR it tries to write to /icinga2 and /run: - installPhase = '' - rm -rf tmp - mkdir -p tmp - make install DESTDIR=$(pwd)/tmp - mv tmp/$out $out - mv tmp/icinga2 $out/icinga2 - rm -rf $out/run - for s in $out/icinga2/etc/icinga2/scripts/* ; do - substituteInPlace $s --replace /usr/bin/printf printf - done - ''; -} |