diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index ae5efd9b6..f5ee616ad 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -16,11 +16,6 @@ These templates are imported by the provided example configuration. > These templates are built into the binaries. By convention > all command and timeperiod objects should import these templates. -If you're not using the ITL includes you can manually load the -library which contains these templates: - - library "methods" - ### plugin-check-command Command template for check plugins executed by Icinga 2. diff --git a/itl/CMakeLists.txt b/itl/CMakeLists.txt index 7f12eb0d8..934195fa7 100644 --- a/itl/CMakeLists.txt +++ b/itl/CMakeLists.txt @@ -18,6 +18,6 @@ add_subdirectory(plugins-contrib.d) install( - FILES itl command.conf command-icinga.conf hangman plugins command-plugins.conf manubulon command-plugins-manubulon.conf windows-plugins command-plugins-windows.conf nscp command-nscp-local.conf plugins-contrib + FILES itl command-icinga.conf hangman plugins command-plugins.conf manubulon command-plugins-manubulon.conf windows-plugins command-plugins-windows.conf nscp command-nscp-local.conf plugins-contrib DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include ) diff --git a/itl/command.conf b/itl/command.conf deleted file mode 100644 index 3a9d9177a..000000000 --- a/itl/command.conf +++ /dev/null @@ -1,20 +0,0 @@ -/****************************************************************************** - * Icinga 2 * - * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/) * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software Foundation * - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * - ******************************************************************************/ - -library "methods" diff --git a/itl/itl b/itl/itl index dead0bb0a..ad8fbe092 100644 --- a/itl/itl +++ b/itl/itl @@ -22,5 +22,4 @@ * configuration templates. */ -include "command.conf" include "command-icinga.conf" diff --git a/lib/icinga/icingaapplication.cpp b/lib/icinga/icingaapplication.cpp index 0be50a0d4..478a7ae0a 100644 --- a/lib/icinga/icingaapplication.cpp +++ b/lib/icinga/icingaapplication.cpp @@ -33,6 +33,7 @@ #include "base/scriptglobal.hpp" #include "base/initialize.hpp" #include "base/statsfunction.hpp" +#include "base/loader.hpp" using namespace icinga; @@ -43,6 +44,8 @@ INITIALIZE_ONCE(&IcingaApplication::StaticInitialize); void IcingaApplication::StaticInitialize(void) { + Loader::LoadExtensionLibrary("methods"); + String node_name = Utility::GetFQDN(); if (node_name.IsEmpty()) { diff --git a/test/livestatus-test.cpp b/test/livestatus-test.cpp index 37ff491d7..18aa93207 100644 --- a/test/livestatus-test.cpp +++ b/test/livestatus-test.cpp @@ -52,8 +52,6 @@ struct LivestatusFixture static void CreateTestObjects(void) { String config = R"CONFIG( -library "methods" - object CheckCommand "dummy" { command = "/bin/echo" }