Skip to content

Commit

Permalink
Add contributed command definitions
Browse files Browse the repository at this point in the history
fixes #7209
fixes #7292
fixes #7294

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
  • Loading branch information
dgoetz authored and gunnarbeutner committed Feb 18, 2015
1 parent afb9bea commit 7f368c0
Show file tree
Hide file tree
Showing 9 changed files with 647 additions and 38 deletions.
198 changes: 161 additions & 37 deletions doc/7-icinga-template-library.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions etc/icinga2/constants.conf.cmake
Expand Up @@ -12,6 +12,11 @@ const PluginDir = "@ICINGA2_PLUGINDIR@"
*/
const ManubulonPluginDir = "@ICINGA2_PLUGINDIR@"

/* The directory which you use to store additional plugins which ITL provides user contributed command definitions for.
* Check the documentation, chapter "Plugins Contribution", for details.
*/
const PluginsContribDir = "@ICINGA2_PLUGINDIR@"

/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`.
* This should be the common name from the API certificate.
*/
Expand Down
1 change: 1 addition & 0 deletions etc/icinga2/icinga2.conf
Expand Up @@ -25,6 +25,7 @@ include "zones.conf"
*/
include <itl>
include <plugins>
// include <plugins-contrib>

/**
* The features-available directory contains a number of configuration
Expand Down
4 changes: 3 additions & 1 deletion itl/CMakeLists.txt
Expand Up @@ -15,7 +15,9 @@
# along with this program; if not, write to the Free Software Foundation
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

add_subdirectory(plugins-contrib.d)

install(
FILES itl command.conf command-icinga.conf timeperiod.conf plugins command-plugins.conf manubulon command-plugins-manubulon.conf
FILES itl command.conf command-icinga.conf timeperiod.conf plugins command-plugins.conf manubulon command-plugins-manubulon.conf plugins-contrib
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include
)
26 changes: 26 additions & 0 deletions itl/plugins-contrib
@@ -0,0 +1,26 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2015 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 a directory for various contributed command definitions.
* Plugins should be organized by a category, e.g. database plugins are in
* plugins-contrib.d/databases.conf
*/

include_recursive "plugins-contrib.d"
21 changes: 21 additions & 0 deletions itl/plugins-contrib.d/CMakeLists.txt
@@ -0,0 +1,21 @@
# Icinga 2
# Copyright (C) 2012-2015 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.

install(
FILES network-components.conf operating-system.conf virtualization.conf
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include/plugins-contrib.d
)
294 changes: 294 additions & 0 deletions itl/plugins-contrib.d/network-components.conf
@@ -0,0 +1,294 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2015 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 "interfacetable" {
import "plugin-check-command"

command = [ PluginsContribDir + "/check_interface_table_v3t" ]

arguments = {
"-H" = {
value = "$interfacetable_hostquery$"
description = "Specifies the remote host to poll"
}
"-h" = {
value = "$interfacetable_hostdisplay$"
description = "Specifies the hostname to display in the HTML link"
}
"-r" = {
set_if = "$interfacetable_regex$"
description = "Interface names and property names for some other options will be interpreted as regular expressions"
}
"--outputshort" = {
set_if = "$interfacetable_outputshort$"
description = "Reduce the verbosity of the plugin output"
}
"-e" = {
value = "$interfacetable_exclude$"
description = "Comma separated list of interfaces globally excluded from the monitoring"
}
"-i" = {
value = "$interfacetable_include$"
description = "Comma separated list of interfaces globally included in the monitoring"
}
"--alias-matching" = {
set_if = "$interfacetable_aliasmatching$"
description = "Allow you to specify alias in addition to interface names"
}
"--et" = {
value = "$interfacetable_excludetraffic$"
description = "Comma separated list of interfaces excluded from traffic checks"
}
"--it" = {
value = "$interfacetable_includetraffic$"
description = "Comma separated list of interfaces included for traffic checks"
}
"--wt" = {
value = "$interfacetable_warningtraffic$"
description = "Interface traffic load percentage leading to a warning alert"
}
"--ct" = {
value = "$interfacetable_criticaltraffic$"
description = "Interface traffic load percentage leading to a critical alert"
}
"--pkt" = {
set_if = "$interfacetable_pkt$"
description = "Add unicast/non-unicast pkt stats for each interface"
}
"--tp" = {
value = "$interfacetable_trackproperty$"
description = "List of tracked properties"
}
"--ep" = {
value = "$interfacetable_excludeproperty$"
description = "Comma separated list of interfaces excluded from the property tracking"
}
"--ip" = {
value = "$interfacetable_includeproperty$"
description = "Comma separated list of interfaces included in the property tracking"
}
"--wp" = {
value = "$interfacetable_warningproperty$"
description = "Number of property changes before leading to a warning alert"
}
"--cp" = {
value = "$interfacetable_criticalproperty$"
description = "Number of property changes before leading to a critical alert"
}
"-C" = {
value = "$interfacetable_community$"
description = "Specifies the snmp v1/v2c community string"
}
"-2" = {
set_if = "$interfacetable_snmpv2$"
description = "Use snmp v2c"
}
"-l" = {
value = "$interfacetable_login$"
description = "Login for snmpv3 authentication"
}
"-x" = {
value = "$interfacetable_passwd$"
description = "Auth password for snmpv3 authentication"
}
"-X" = {
value = "$interfacetable_privpass$"
description = "Priv password for snmpv3"
}
"-L" = {
value = "$interfacetable_protocols$"
description = "Authentication protocol,Priv protocol"
}
"--domain" = {
value = "$interfacetable_domain$"
description = "SNMP transport domain"
}
"--contextname" = {
value = "$interfacetable_contextname$"
description = "Context name for the snmp requests"
}
"-P" = {
value = "$interfacetable_port$"
description = "SNMP port"
}
"--64bits" = {
set_if = "$interfacetable_64bits$"
description = "Use SNMP 64-bits counters"
}
"--max-repetitions" = {
value = "$interfacetable_maxrepetitions$"
description = "Increasing this value may enhance snmp query performances by gathering more results at one time"
}
"--snmp-timeout" = {
value = "$interfacetable_snmptimeout$"
description = "Define the Transport Layer timeout for the snmp queries"
}
"--snmp-retries" = {
value = "$interfacetable_snmpretries$"
description = "Define the number of times to retry sending a SNMP message"
}
"--unixsnmp" = {
set_if = "$interfacetable_unixsnmp$"
description = "Use unix snmp utilities for snmp requests"
}
"-f" = {
set_if = "$interfacetable_enableperfdata$"
description = "Enable port performance data"
}
"--perfdataformat" = {
value = "$interfacetable_perfdataformat$"
description = "Define which performance data will be generated"
}
"--perfdatathreshold" = {
value = "$interfacetable_perfdatathreshold$"
description = "Define which thresholds are printed in the generated performance data"
}
"--perfdatadir" = {
value = "$interfacetable_perfdatadir$"
description = "When specified, the performance data are also written directly to a file, in the specified location"
}
"--perfdataservicedesc" = {
value = "$interfacetable_perfdataservicedesc$"
description = "Specify additional parameters for output performance data to PNP"
}
"-g" = {
value = "$interfacetable_grapher$"
description = "Specify the used graphing solution"
}
"--grapherurl" = {
value = "$interfacetable_grapherurl$"
description = "Graphing system url"
}
"--portperfunit" = {
value = "$interfacetable_portperfunit$"
description = "Traffic could be reported in bits (counters) or in bps (calculated value)"
}
"--nodetype" = {
value = "$interfacetable_nodetype$"
description = "Specify the node type, for specific information to be printed / specific oids to be used"
}
"--duplex" = {
set_if = "$interfacetable_duplex$"
description = "Add the duplex mode property for each interface in the interface table"
}
"--stp" = {
set_if = "$interfacetable_stp$"
description = "Add the stp state property for each interface in the interface table"
}
"--vlan" = {
set_if = "$interfacetable_vlan$"
description = "Add the vlan attribution property for each interface in the interface table"
}
"--noipinfo" = {
set_if = "$interfacetable_noipinfo$"
description = "Remove the ip information for each interface from the interface table"
}
"--alias" = {
set_if = "$interfacetable_alias$"
description = "Add the alias information for each interface in the interface table"
}
"--accessmethod" = {
value = "$interfacetable_accessmethod$"
description = "Access method for a shortcut to the host in the HTML page"
}
"--htmltablelinktarget" = {
value = "$interfacetable_htmltablelinktarget$"
description = "Specifies the windows or the frame where the [details] link will load the generated html page"
}
"--delta" = {
value = "$interfacetable_delta$"
description = "Set the delta used for interface throuput calculation"
}
"--ifs" = {
value = "$interfacetable_ifs$"
description = "Input field separator"
}
"--cache" = {
value = "$interfacetable_cache$"
description = "Define the retention time of the cached data"
}
"--noifloadgradient" = {
set_if = "$interfacetable_noifloadgradient$"
description = "Disable color gradient from green over yellow to red for the load percentage"
}
"--nohuman" = {
set_if = "$interfacetable_nohuman$"
description = "Do not translate bandwidth usage in human readable format"
}
"--snapshot" = {
set_if = "$interfacetable_snapshot$"
description = "Force the plugin to run like if it was the first launch"
}
"--timeout" = {
value = "$interfacetable_timeout$"
description = "Define the global timeout limit of the plugin"
}
"--css" = {
value = "$interfacetable_css$"
description = "Define the css stylesheet used by the generated html files"
}
"--config" = {
value = "$interfacetable_config$"
description = "Specify a config file to load"
}
"--noconfigtable" = {
set_if = "$interfacetable_noconfigtable$"
description = "Disable configuration table on the generated HTML page"
}
"--notips" = {
set_if = "$interfacetable_notips$"
description = "Disable the tips in the generated html tables"
}
"--default-table-sorting" = {
value = "$interfacetable_defaulttablesorting$"
description = "Default table sorting"
}
"--table-split" = {
set_if = "$interfacetable_tablesplit$"
description = "Generate multiple interface tables, one per interface type"
}
"--notype" = {
set_if = "$interfacetable_notype$"
description = "Remove the interface type for each interface"
}
}

vars.interfacetable_hostquery = "$address$"
vars.interfacetable_hostdisplay = "$host.display_name$"
vars.interfacetable_perfdataservicedesc = "$service.name$"
vars.interfacetable_regex = false
vars.interfacetable_outputshort = false
vars.interfacetable_aliasmatching = false
vars.interfacetable_pkt = false
vars.interfacetable_snmpv2 = false
vars.interfacetable_64bits = false
vars.interfacetable_unixsnmp = false
vars.interfacetable_enableperfdata = false
vars.interfacetable_duplex = false
vars.interfacetable_stp = false
vars.interfacetable_vlan = false
vars.interfacetable_noipinfo = false
vars.interfacetable_noifloadgradient = false
vars.interfacetable_nohuman = false
vars.interfacetable_snapshot = false
vars.interfacetable_noconfigtable = false
vars.interfacetable_notips = false
vars.interfacetable_notype = false
}

0 comments on commit 7f368c0

Please sign in to comment.