mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Make sure that libmethods is automatically loaded even when not using the ITL
fixes #12578
This commit is contained in:
parent
20174a0baa
commit
903db81fe0
@ -16,11 +16,6 @@ These templates are imported by the provided example configuration.
|
|||||||
> These templates are built into the binaries. By convention
|
> These templates are built into the binaries. By convention
|
||||||
> all command and timeperiod objects should import these templates.
|
> 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"
|
|
||||||
|
|
||||||
### <a id="itl-plugin-check-command"></a> plugin-check-command
|
### <a id="itl-plugin-check-command"></a> plugin-check-command
|
||||||
|
|
||||||
Command template for check plugins executed by Icinga 2.
|
Command template for check plugins executed by Icinga 2.
|
||||||
|
@ -18,6 +18,6 @@
|
|||||||
add_subdirectory(plugins-contrib.d)
|
add_subdirectory(plugins-contrib.d)
|
||||||
|
|
||||||
install(
|
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
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include
|
||||||
)
|
)
|
||||||
|
@ -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"
|
|
1
itl/itl
1
itl/itl
@ -22,5 +22,4 @@
|
|||||||
* configuration templates.
|
* configuration templates.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include "command.conf"
|
|
||||||
include "command-icinga.conf"
|
include "command-icinga.conf"
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "base/scriptglobal.hpp"
|
#include "base/scriptglobal.hpp"
|
||||||
#include "base/initialize.hpp"
|
#include "base/initialize.hpp"
|
||||||
#include "base/statsfunction.hpp"
|
#include "base/statsfunction.hpp"
|
||||||
|
#include "base/loader.hpp"
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
@ -43,6 +44,8 @@ INITIALIZE_ONCE(&IcingaApplication::StaticInitialize);
|
|||||||
|
|
||||||
void IcingaApplication::StaticInitialize(void)
|
void IcingaApplication::StaticInitialize(void)
|
||||||
{
|
{
|
||||||
|
Loader::LoadExtensionLibrary("methods");
|
||||||
|
|
||||||
String node_name = Utility::GetFQDN();
|
String node_name = Utility::GetFQDN();
|
||||||
|
|
||||||
if (node_name.IsEmpty()) {
|
if (node_name.IsEmpty()) {
|
||||||
|
@ -52,8 +52,6 @@ struct LivestatusFixture
|
|||||||
static void CreateTestObjects(void)
|
static void CreateTestObjects(void)
|
||||||
{
|
{
|
||||||
String config = R"CONFIG(
|
String config = R"CONFIG(
|
||||||
library "methods"
|
|
||||||
|
|
||||||
object CheckCommand "dummy" {
|
object CheckCommand "dummy" {
|
||||||
command = "/bin/echo"
|
command = "/bin/echo"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user