2015-02-04 17:31:13 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* 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"
|
|
|
|
|
2015-02-23 15:35:12 +01:00
|
|
|
command = [ PluginContribDir + "/check_interface_table_v3t" ]
|
2015-02-04 17:31:13 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2015-05-13 14:13:45 +02:00
|
|
|
object CheckCommand "iftraffic" {
|
|
|
|
import "plugin-check-command"
|
2015-05-13 14:19:20 +02:00
|
|
|
import "ipv4-or-ipv6"
|
|
|
|
|
2015-06-29 08:19:54 +02:00
|
|
|
command = [ PluginContribDir + "/check_iftraffic64.pl"]
|
2015-05-13 14:13:45 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = {
|
|
|
|
value = "$iftraffic_address$"
|
|
|
|
description = "Check interface on the indicated host."
|
|
|
|
required = true
|
|
|
|
}
|
|
|
|
"-C" = {
|
|
|
|
value = "$iftraffic_community$"
|
|
|
|
description = "SNMP community. Defaults to 'public' if omitted."
|
|
|
|
}
|
|
|
|
"-i" = {
|
|
|
|
value = "$iftraffic_interface$"
|
|
|
|
description = "Interface name."
|
|
|
|
required = true
|
|
|
|
}
|
|
|
|
"-b" = {
|
|
|
|
value = "$iftraffic_bandwidth$"
|
|
|
|
description = "Interface maximum speed in kilo/mega/giga/bits per second."
|
|
|
|
required = true
|
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
value = "$iftraffic_units$"
|
|
|
|
description = "g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s."
|
|
|
|
}
|
|
|
|
"-w" = {
|
|
|
|
value = "$iftraffic_warn$"
|
|
|
|
description = "% of bandwidth usage necessary to result in warning status (default: 85%)"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$iftraffic_crit$"
|
|
|
|
description = "% of bandwidth usage necessary to result in critical status (default: 98%)"
|
|
|
|
}
|
|
|
|
"-M" = {
|
|
|
|
value = "$iftraffic_max_counter$"
|
|
|
|
description = "Max counter value of net devices in kilo/mega/giga/bytes."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-13 14:19:20 +02:00
|
|
|
vars.iftraffic_address = "$check_address$"
|
2015-05-13 14:13:45 +02:00
|
|
|
vars.iftraffic_warn = "85%"
|
|
|
|
vars.iftraffic_crit = "98%"
|
|
|
|
}
|
|
|
|
|
2015-08-02 07:36:08 +02:00
|
|
|
object CheckCommand "interfaces" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
import "ipv4-or-ipv6"
|
|
|
|
|
|
|
|
command = [ PluginContribDir + "/check_interfaces" ]
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"--hostname" = "$interfaces_address$"
|
|
|
|
"--community" = {
|
|
|
|
value = "$interfaces_community$"
|
|
|
|
description = "The community string (default public)."
|
|
|
|
}
|
|
|
|
"--regex" = {
|
|
|
|
value = "$interfaces_regex$"
|
|
|
|
description = "Interface list regexp."
|
|
|
|
}
|
|
|
|
"--exclude-regex" = {
|
|
|
|
value = "$interfaces_exclude_regex$"
|
|
|
|
description = "Interface list negative regexp."
|
|
|
|
}
|
|
|
|
"--errors" = {
|
|
|
|
value = "$interfaces_errors$"
|
|
|
|
description = "Number of in errors (CRC errors for cisco) to consider a warning (default 50)."
|
|
|
|
}
|
|
|
|
"--out-errors" = {
|
|
|
|
value = "$interface_out_errors$"
|
|
|
|
description = "Number of out errors (collisions for cisco) to consider a warning (default same as in errors)."
|
|
|
|
}
|
|
|
|
"--perfdata" = {
|
|
|
|
value = "$interfaces_perfdata$"
|
|
|
|
}
|
|
|
|
"--prefix" = {
|
|
|
|
value = "$interfaces_prefix$"
|
|
|
|
description = "Prefix interface names with this label."
|
|
|
|
}
|
|
|
|
"--lastcheck" = {
|
|
|
|
value = "$interfaces_lastcheck$"
|
|
|
|
description = "Last checktime (unixtime)."
|
|
|
|
}
|
|
|
|
"--bandwidth" = {
|
|
|
|
value = "$interfaces_bandwidth$"
|
|
|
|
description = "Bandwidth warn level in percent."
|
|
|
|
}
|
|
|
|
"--speed" = {
|
|
|
|
value = "$interfaces_speed$"
|
|
|
|
description = "Override speed detection with this value (bits per sec)."
|
|
|
|
}
|
|
|
|
"--trim" = {
|
|
|
|
value = "$interfaces_trim$"
|
|
|
|
description = "Cut this number of characters from the start of interface descriptions."
|
|
|
|
}
|
|
|
|
"--mode" = {
|
|
|
|
value = "$interfaces_mode$"
|
|
|
|
description = "Special operating mode (default,cisco,nonbulk,bintec)."
|
|
|
|
}
|
|
|
|
"--auth-proto" = {
|
|
|
|
value = "$interfaces_auth_proto$"
|
|
|
|
description = "SNMPv3 Auth Protocol (SHA|MD5)"
|
|
|
|
}
|
|
|
|
"--auth-phrase" = {
|
|
|
|
value = "$interfaces_auth_phrase$"
|
|
|
|
description = "SNMPv3 Auth Phrase"
|
|
|
|
}
|
|
|
|
"--priv-proto" = {
|
|
|
|
value = "$interfaces_priv_proto$"
|
|
|
|
description = "SNMPv3 Privacy Protocol (AES|DES)"
|
|
|
|
}
|
|
|
|
"--priv-phrase" = {
|
|
|
|
value = "$interfaces_priv_phrase$"
|
|
|
|
description = "SNMPv3 Privacy Phrase"
|
|
|
|
}
|
|
|
|
"--user" = {
|
|
|
|
value = "$interfaces_user$"
|
|
|
|
description = "SNMPv3 User"
|
|
|
|
}
|
|
|
|
"--down-is-ok" = {
|
|
|
|
set_if = "$interfaces_down_is_ok$"
|
|
|
|
description = "Disables critical alerts for down interfaces."
|
|
|
|
}
|
|
|
|
"--aliases" = {
|
|
|
|
set_if = "$interfaces_aliases$"
|
|
|
|
description = "Retrieves the interface description."
|
|
|
|
}
|
|
|
|
"--match-aliases" = {
|
|
|
|
value = "$interfaces_match_aliases$"
|
|
|
|
description = "Also match against aliases (Option --aliases automatically enabled)."
|
|
|
|
}
|
|
|
|
"--timeout" = {
|
|
|
|
value = "$interfaces_timeout$"
|
|
|
|
description = "Sets the SNMP timeout (in ms)."
|
|
|
|
}
|
|
|
|
"--sleep" = {
|
|
|
|
value = "$interfaces_sleep$"
|
|
|
|
description = "Sleep between every SNMP query (in ms)."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.interfaces_address = "$check_address$"
|
|
|
|
}
|