Include monitoring plugin commands seperately.

Fixes #6130
This commit is contained in:
Michael Friedrich 2014-05-10 18:23:08 +02:00
parent faf758eb26
commit d06d4f2540
15 changed files with 379 additions and 277 deletions

View File

@ -11,5 +11,6 @@
#define ICINGA_SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}"
#define ICINGA_LOCALSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}"
#define ICINGA_PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/icinga2"
#define ICINGA_INCLUDECONFDIR "${CMAKE_INSTALL_FULL_DATADIR}/icinga2/include"
#endif /* CONFIG_H */

View File

@ -56,7 +56,7 @@ By default Icinga 2 uses the following files and directories:
/usr/bin/icinga2-* | Migration and certificate build scripts.
/usr/sbin/icinga2* | The Icinga 2 binary and feature enable/disable scripts.
/usr/share/doc/icinga2 | Documentation files that come with Icinga 2.
/usr/share/icinga2/itl | The Icinga Template Library.
/usr/share/icinga2/include | The Icinga Template Library and plugin command configuration.
/var/run/icinga2 | PID file.
/var/run/icinga2/cmd | Command pipe and Livestatus socket.
/var/cache/icinga2 | status.dat/objects.cache.
@ -91,8 +91,10 @@ The `include` directive can be used to include other files.
/**
* The Icinga Template Library (ITL) provides a number of useful templates
* and command definitions.
* Common monitoring plugin command definitions are included seperately.
*/
include <itl/itl.conf>
include <itl>
include <plugins>
/**
* The features-available directory contains a number of configuration
@ -208,9 +210,10 @@ Template Library require an `address` custom attribute.
check_command = "disk"
}
The command objects `icinga`, `http_ip`, `ssh`, `load`, `processes`, `users`
and `disk` are all provided by the Icinga Template Library (ITL) which
we enabled earlier by including the `itl/itl.conf` configuration file.
The command object `icinga` for the embedded health check is provided by the
[Icinga Template Library (ITL)](#itl) while `http_ip`, `ssh`, `load`, `processes`,
`users` and `disk` are all provided by the plugin check commands which we enabled
earlier by including the `itl` and `plugins` configuration file.
> **Best Practice**
>

View File

@ -470,7 +470,7 @@ Wildcard includes are not recursive.
Icinga also supports include search paths similar to how they work in a
C/C++ compiler:
include <itl/itl.conf>
include <itl>
Note the use of angle brackets instead of double quotes. This causes the
config compiler to search the include search paths for the specified

View File

@ -91,10 +91,11 @@ a separate option and add the directory and an option pattern.
include_recursive "conf.d" "*.conf"
A global search path for includes is available for advanced features like
the Icinga Template Library (ITL). The file suffix does not matter as long
as it matches the (wildcard) include expression.
the Icinga Template Library (ITL) or additional monitoring plugins check
command configuration.
include <itl/itl.conf>
include <itl>
include <plugins>
By convention the `.conf` suffix is used for Icinga 2 configuration files.

View File

@ -10,259 +10,11 @@ definitions for commonly used services.
You can include the ITL by using the `include` directive in your configuration
file:
include <itl/itl.conf>
include <itl>
The ITL assumes that there's a global constant named `PluginDir` which contains
the path of the plugins from the Monitoring Plugins project.
### <a id="itl-check-commands"></a> Check Commands
#### <a id="itl-ping4"></a> ping4
Check command object for the `check_ping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="itl-ping6"></a> ping6
Check command object for the `check_ping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv6 address. Defaults to "$address6$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="itl-hostalive"></a> hostalive
Check command object for the `check_ping` plugin with host check default values.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 3000.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 80.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 5000.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 100.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="itl-dummy"></a> dummy
Check command object for the `check_dummy` plugin.
Custom Attributes:
Name | Description
----------------|--------------
dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0.
dummy_text | **Optional.** Plugin output. Defaults to "Check was successful.".
#### <a id="itl-passive"></a> passive
Specialised check command object for passive checks executing the `check_dummy` plugin with appropriate default values.
Custom Attributes:
Name | Description
----------------|--------------
dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 3.
dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.".
#### <a id="itl-tcp"></a> tcp
Check command object for the `check_tcp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
tcp_address | **Optional.** The host's address. Defaults to "$address$".
tcp_port | **Required.** The port that should be checked.
#### <a id="itl-udp"></a> udp
Check command object for the `check_udp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
udp_address | **Optional.** The host's address. Defaults to "$address$".
udp_port | **Required.** The port that should be checked.
#### <a id="itl-http-ip"></a> http
Check command object for the `check_http` plugin.
Custom Attributes:
Name | Description
-------------------|--------------
http_address | **Optional.** The host's address. Defaults to "$address".
http_vhost | **Optional.** The virtual host that should be sent in the "Host" header.
http_uri | **Optional.** The request URI.
http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise.
http_ssl | **Optional.** Whether to use SSL. Defaults to false.
http_warn_time | **Optional.** The warning threshold.
http_critical_time | **Optional.** The critical threshold.
#### <a id="itl-smtp"></a> smtp
Check command object for the `check_smtp` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
smtp_address | **Optional.** The host's address. Defaults to "$address$".
#### <a id="itl-ssmtp"></a> ssmtp
Check command object for the `check_ssmtp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ssmtp_address | **Required.** The host's address. Defaults to "$address$".
ssmtp_port | **Optional.** The port that should be checked. Defaults to 465.
#### <a id="itl-ntp-time"></a> ntp_time
Check command object for the `check_ntp_time` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ntp_address | **Optional.** The host's address. Defaults to "$address$".
#### <a id="itl-ssh"></a> ssh
Check command object for the `check_ssh` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ssh_address | **Optional.** The host's address. Defaults to "$address$".
ssh_port | **Optional.** The port that should be checked. Defaults to 22.
#### <a id="itl-disk"></a> disk
Check command object for the `check_disk` plugin.
Custom Attributes:
Name | Description
----------------|--------------
disk_wfree | **Optional.** The free space warning threshold in %. Defaults to 20.
disk_cfree | **Optional.** The free space critical threshold in %. Defaults to 10.
#### <a id="itl-users"></a> users
Check command object for the `check_disk` plugin.
Custom Attributes:
Name | Description
----------------|--------------
users_wgreater | **Optional.** The user count warning threshold. Defaults to 20.
users_cgreater | **Optional.** The user count critical threshold. Defaults to 50.
#### <a id="itl-processes"></a> procs
Check command object for the `check_procs` plugin.
Custom Attributes:
Name | Description
----------------|--------------
procs_wgreater | **Optional.** The process count warning threshold. Defaults to 250.
procs_cgreater | **Optional.** The process count critical threshold. Defaults to 400.
#### <a id="itl-swap"></a> swap
Check command object for the `check_swap` plugin.
Custom Attributes:
Name | Description
----------------|--------------
swap_wfree | **Optional.** The free swap space warning threshold in %. Defaults to 50.
swap_cfree | **Optional.** The free swap space critical threshold in %. Defaults to 25.
#### <a id="itl-load"></a> load
Check command object for the `check_load` plugin.
Custom Attributes:
Name | Description
----------------|--------------
load_wload1 | **Optional.** The 1-minute warning threshold. Defaults to 5.
load_wload5 | **Optional.** The 5-minute warning threshold. Defaults to 4.
load_wload15 | **Optional.** The 15-minute warning threshold. Defaults to 3.
load_cload1 | **Optional.** The 1-minute critical threshold. Defaults to 10.
load_cload5 | **Optional.** The 5-minute critical threshold. Defaults to 6.
load_cload15 | **Optional.** The 15-minute critical threshold. Defaults to 4.
#### <a id="itl-snmp"></a> snmp
Check command object for the `check_snmp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_oid | **Required.** The SNMP OID.
snmp_community | **Optional.** The SNMP community. Defaults to "public".
#### <a id="itl-snmp-uptime"></a> snmp-uptime
Check command object for the `check_snmp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_oid | **Optional.** The SNMP OID. Defaults to "1.3.6.1.2.1.1.3.0".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
#### <a id="itl-apt"></a> apt
Check command for the `check_apt` plugin.
The `apt` check command does not support any vars.
#### <a id="itl-icinga"></a> icinga
Check command for the built-in `icinga` check. This check returns performance
data for the current Icinga instance.
The `icinga` check command does not support any vars.
### <a id="itl-generic-templates"></a> Generic Templates
These templates are imported by the provided example configuration.
#### <a id="itl-plugin-check-command"></a> plugin-check-command
@ -282,6 +34,281 @@ Check command template for event handler scripts executed by Icinga 2.
The `plugin-event-command` check command does not support any vars.
### <a id="itl-check-commands"></a> Check Commands
These check commands are embedded into Icinga 2 and do not require any external
plugin scripts.
#### <a id="itl-icinga"></a> icinga
Check command for the built-in `icinga` check. This check returns performance
data for the current Icinga instance.
The `icinga` check command does not support any vars.
#### <a id="itl-icinga"></a> cluster
Check command for the built-in `cluster` check. This check returns performance
data for the current Icinga instance and connected endpoints.
The `cluster` check command does not support any vars.
## <a id="plugin-check-commands"></a> Plugin Check Commands
### <a id="plugin-check-command-overview"></a> Overview
The Plugin Check Commands provides example configuration for plugin check commands
provided by the the Monitoring Plugins project.
You can include the plugin check command definitions by using the `include`
directive in your configuration file:
include <plugins>
The plugin check commands assume that there's a global constant named `PluginDir`
which contains the path of the plugins from the Monitoring Plugins project.
#### <a id="plugin-check-command-ping4"></a> ping4
Check command object for the `check_ping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="plugin-check-command-ping6"></a> ping6
Check command object for the `check_ping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv6 address. Defaults to "$address6$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="plugin-check-command-hostalive"></a> hostalive
Check command object for the `check_ping` plugin with host check default values.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 3000.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 80.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 5000.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 100.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="plugin-check-command-dummy"></a> dummy
Check command object for the `check_dummy` plugin.
Custom Attributes:
Name | Description
----------------|--------------
dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0.
dummy_text | **Optional.** Plugin output. Defaults to "Check was successful.".
#### <a id="plugin-check-command-passive"></a> passive
Specialised check command object for passive checks executing the `check_dummy` plugin with appropriate default values.
Custom Attributes:
Name | Description
----------------|--------------
dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 3.
dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.".
#### <a id="plugin-check-command-tcp"></a> tcp
Check command object for the `check_tcp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
tcp_address | **Optional.** The host's address. Defaults to "$address$".
tcp_port | **Required.** The port that should be checked.
#### <a id="plugin-check-command-udp"></a> udp
Check command object for the `check_udp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
udp_address | **Optional.** The host's address. Defaults to "$address$".
udp_port | **Required.** The port that should be checked.
#### <a id="plugin-check-command-http-ip"></a> http
Check command object for the `check_http` plugin.
Custom Attributes:
Name | Description
-------------------|--------------
http_address | **Optional.** The host's address. Defaults to "$address".
http_vhost | **Optional.** The virtual host that should be sent in the "Host" header.
http_uri | **Optional.** The request URI.
http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise.
http_ssl | **Optional.** Whether to use SSL. Defaults to false.
http_warn_time | **Optional.** The warning threshold.
http_critical_time | **Optional.** The critical threshold.
#### <a id="plugin-check-command-smtp"></a> smtp
Check command object for the `check_smtp` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
smtp_address | **Optional.** The host's address. Defaults to "$address$".
#### <a id="plugin-check-command-ssmtp"></a> ssmtp
Check command object for the `check_ssmtp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ssmtp_address | **Required.** The host's address. Defaults to "$address$".
ssmtp_port | **Optional.** The port that should be checked. Defaults to 465.
#### <a id="plugin-check-command-ntp-time"></a> ntp_time
Check command object for the `check_ntp_time` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ntp_address | **Optional.** The host's address. Defaults to "$address$".
#### <a id="plugin-check-command-ssh"></a> ssh
Check command object for the `check_ssh` plugin.
Custom Attributes:
Name | Description
----------------|--------------
ssh_address | **Optional.** The host's address. Defaults to "$address$".
ssh_port | **Optional.** The port that should be checked. Defaults to 22.
#### <a id="plugin-check-command-disk"></a> disk
Check command object for the `check_disk` plugin.
Custom Attributes:
Name | Description
----------------|--------------
disk_wfree | **Optional.** The free space warning threshold in %. Defaults to 20.
disk_cfree | **Optional.** The free space critical threshold in %. Defaults to 10.
#### <a id="plugin-check-command-users"></a> users
Check command object for the `check_disk` plugin.
Custom Attributes:
Name | Description
----------------|--------------
users_wgreater | **Optional.** The user count warning threshold. Defaults to 20.
users_cgreater | **Optional.** The user count critical threshold. Defaults to 50.
#### <a id="plugin-check-command-processes"></a> procs
Check command object for the `check_procs` plugin.
Custom Attributes:
Name | Description
----------------|--------------
procs_wgreater | **Optional.** The process count warning threshold. Defaults to 250.
procs_cgreater | **Optional.** The process count critical threshold. Defaults to 400.
#### <a id="plugin-check-command-swap"></a> swap
Check command object for the `check_swap` plugin.
Custom Attributes:
Name | Description
----------------|--------------
swap_wfree | **Optional.** The free swap space warning threshold in %. Defaults to 50.
swap_cfree | **Optional.** The free swap space critical threshold in %. Defaults to 25.
#### <a id="plugin-check-command-load"></a> load
Check command object for the `check_load` plugin.
Custom Attributes:
Name | Description
----------------|--------------
load_wload1 | **Optional.** The 1-minute warning threshold. Defaults to 5.
load_wload5 | **Optional.** The 5-minute warning threshold. Defaults to 4.
load_wload15 | **Optional.** The 15-minute warning threshold. Defaults to 3.
load_cload1 | **Optional.** The 1-minute critical threshold. Defaults to 10.
load_cload5 | **Optional.** The 5-minute critical threshold. Defaults to 6.
load_cload15 | **Optional.** The 15-minute critical threshold. Defaults to 4.
#### <a id="plugin-check-command-snmp"></a> snmp
Check command object for the `check_snmp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_oid | **Required.** The SNMP OID.
snmp_community | **Optional.** The SNMP community. Defaults to "public".
#### <a id="plugin-check-command-snmp-uptime"></a> snmp-uptime
Check command object for the `check_snmp` plugin.
Custom Attributes:
Name | Description
----------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$".
snmp_oid | **Optional.** The SNMP OID. Defaults to "1.3.6.1.2.1.1.3.0".
snmp_community | **Optional.** The SNMP community. Defaults to "public".
#### <a id="plugin-check-command-apt"></a> apt
Check command for the `check_apt` plugin.
The `apt` check command does not support any vars.
## <a id="schemas"></a> Schemas

View File

@ -15,8 +15,10 @@ include "constants.conf"
/**
* The Icinga Template Library (ITL) provides a number of useful templates
* and command definitions.
* Common monitoring plugin command definitions are included seperately.
*/
include <itl/itl.conf>
include <itl>
include <plugins>
/**
* The features-available directory contains a number of configuration

View File

@ -246,6 +246,7 @@ int Main(void)
Application::DeclareSysconfDir(prefix + "\\etc");
Application::DeclareLocalStateDir(prefix + "\\var");
Application::DeclarePkgDataDir(prefix + "\\share\\icinga2");
Application::DeclareIncludeConfDir(prefix + "\\share\\icinga2\\include");
builtinPaths = false;
}
@ -261,6 +262,7 @@ int Main(void)
Application::DeclareSysconfDir(ICINGA_SYSCONFDIR);
Application::DeclareLocalStateDir(ICINGA_LOCALSTATEDIR);
Application::DeclarePkgDataDir(ICINGA_PKGDATADIR);
Application::DeclareIncludeConfDir(ICINGA_INCLUDECONFDIR);
#ifdef _WIN32
}
#endif /* _WIN32 */
@ -419,7 +421,7 @@ int Main(void)
}
}
ConfigCompiler::AddIncludeSearchDir(Application::GetPkgDataDir());
ConfigCompiler::AddIncludeSearchDir(Application::GetIncludeConfDir());
if (g_AppParams.count("include")) {
BOOST_FOREACH(const String& includePath, g_AppParams["include"].as<std::vector<std::string> >()) {

View File

@ -433,7 +433,7 @@ exit 0
%exclude %{_libdir}/%{name}/libdb_ido_pgsql*
%{_libdir}/%{name}
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/itl
%exclude %{_datadir}/%{name}/include
%{_mandir}/man8/%{name}.8.gz
%attr(0755,%{icinga_user},%{icinga_group}) %{_localstatedir}/cache/%{name}
@ -452,8 +452,8 @@ exit 0
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/itl
%{_datadir}/%{name}/itl
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
%{_datadir}/%{name}/include
%files doc
%defattr(-,root,root,-)

View File

@ -16,6 +16,6 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
install(
FILES command.conf command-common.conf itl.conf timeperiod.conf
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/itl
FILES itl command.conf command-icinga.conf timeperiod.conf plugins command-plugins.conf
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include
)

27
itl/command-icinga.conf Normal file
View File

@ -0,0 +1,27 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2014 Icinga Development Team (http://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. *
******************************************************************************/
object CheckCommand "icinga" {
import "icinga-check-command"
}
object CheckCommand "cluster" {
import "cluster-check-command"
}

View File

@ -286,12 +286,3 @@ object CheckCommand "apt" {
PluginDir + "/check_apt"
]
}
object CheckCommand "icinga" {
import "icinga-check-command"
}
object CheckCommand "cluster" {
import "cluster-check-command"
}

View File

@ -23,5 +23,5 @@
*/
include "command.conf"
include "command-common.conf"
include "command-icinga.conf"
include "timeperiod.conf"

25
itl/plugins Normal file
View File

@ -0,0 +1,25 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2014 Icinga Development Team (http://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. *
******************************************************************************/
/**
* This is the Icinga Templare Library, a collection of general purpose Icinga
* configuration templates. This part includes the plugin commands.
*/
include "command-plugins.conf"

View File

@ -822,6 +822,26 @@ void Application::DeclarePkgDataDir(const String& path)
ScriptVariable::Set("PkgDataDir", path, false);
}
/**
* Retrieves the path for the include conf dir.
*
* @returns The path.
*/
String Application::GetIncludeConfDir(void)
{
return ScriptVariable::Get("IncludeConfDir");
}
/**
* Sets the path for the package data dir.
*
* @param path The new path.
*/
void Application::DeclareIncludeConfDir(const String& path)
{
ScriptVariable::Set("IncludeConfDir", path, false);
}
/**
* Retrieves the path for the state file.
*

View File

@ -87,6 +87,9 @@ public:
static String GetPkgDataDir(void);
static void DeclarePkgDataDir(const String& path);
static String GetIncludeConfDir(void);
static void DeclareIncludeConfDir(const String& path);
static String GetStatePath(void);
static void DeclareStatePath(const String& path);