2019-02-25 14:48:22 +01:00
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2014-08-15 14:27:18 +02:00
/**
* main snmp-manubulon template
*/
2014-08-08 14:06:44 +02:00
template CheckCommand "snmp-manubulon-command" {
2015-02-13 11:52:08 +01:00
import "ipv4-or-ipv6"
2014-08-08 14:06:44 +02:00
arguments = {
2017-06-19 15:22:19 +02:00
"-H" = {
value = "$snmp_address$"
description = "Name or IP address of host to check"
}
2014-08-08 14:06:44 +02:00
"-C" = {
set_if = "$snmp_nocrypt$"
value = "$snmp_community$"
2017-06-19 15:22:19 +02:00
description = "Community name for the host's SNMP agent (implies v1 protocol)"
}
"-p" = {
value = "$snmp_port$"
description = "SNMP port (Default 161)"
2014-08-08 14:06:44 +02:00
}
2014-10-09 22:57:35 +02:00
"-2" = {
2014-08-08 14:06:44 +02:00
set_if = "$snmp_v2$"
2017-06-19 15:22:19 +02:00
description = "Use snmp v2c"
2014-08-08 14:06:44 +02:00
}
"-l" = {
set_if = "$snmp_v3$"
value = "$snmp_login$"
2017-06-19 15:22:19 +02:00
description = "Login and auth password for snmpv3 authentication"
2014-08-08 14:06:44 +02:00
}
"-x" = {
set_if = "$snmp_v3$"
value = "$snmp_password$"
2017-06-19 15:22:19 +02:00
description = "Priv password"
2014-08-08 14:06:44 +02:00
}
"-L" = {
set_if = "$snmp_v3_use_authprotocol$"
value = "$snmp_authprotocol$"
2017-06-19 15:22:19 +02:00
description = "<authproto>,<privproto> - <Authentication protocol (md5|sha : default md5)>,<Priv protocole (des|aes : default des)>"
2014-08-08 14:06:44 +02:00
}
"-X" = {
set_if = "$snmp_v3_use_privpass$"
value = "$snmp_privpass$"
2017-06-19 15:22:19 +02:00
description = "Priv password for snmpv3 (AuthPriv protocol)"
}
"-w" = {
value = "$snmp_warn$"
}
"-c" = {
value = "$snmp_crit$"
}
"-t" = {
value = "$snmp_timeout$"
description = "Timeout for SNMP in seconds (Default: 5)"
2014-08-08 14:06:44 +02:00
}
}
2015-02-13 11:52:08 +01:00
vars.snmp_address = "$check_address$"
2014-08-08 14:06:44 +02:00
vars.snmp_nocrypt = true
vars.snmp_community = "public"
vars.snmp_v2 = false
vars.snmp_v3 = false
vars.snmp_login = "snmpuser"
vars.snmp_v3_use_privpass = false
vars.snmp_v3_use_authprotocol = false
vars.snmp_authprotocol = "md5,des"
2014-12-11 22:16:58 +01:00
vars.snmp_timeout = "5"
2014-08-08 14:06:44 +02:00
}
2017-07-05 21:36:16 +02:00
/**
* snmp env
* Url reference: http://nagios.manubulon.com/snmp_env.html
*/
object CheckCommand "snmp-env" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_env.pl" ]
arguments += {
"-T" = {
value = "$snmp_env_type$"
description = "Environment Type [cisco|nokia|bc|iron|foundry|linux]"
}
"-F" = {
value = "$snmp_env_fan$"
description = "Minimum fan rpm value (only needed for 'iron' & 'linux')"
}
"-c" = {
value = "$snmp_env_celsius$"
description = "Maximum temp in degrees celsius (only needed for 'iron' & 'linux')"
}
"-f" = {
set_if = "$snmp_perf$"
description = "Perfparse compatible output"
}
}
vars.snmp_env_type = "cisco"
vars.snmp_perf = true
}
2014-08-15 14:27:18 +02:00
/**
* snmp load
* Url reference: http://nagios.manubulon.com/snmp_load.html
*/
2014-08-08 14:06:44 +02:00
object CheckCommand "snmp-load" {
2014-08-15 14:27:18 +02:00
import "snmp-manubulon-command"
2014-08-08 14:06:44 +02:00
command = [ ManubulonPluginDir + "/check_snmp_load.pl" ]
arguments += {
2017-06-19 15:22:19 +02:00
"-T" = {
value = "$snmp_load_type$"
description = "CPU check"
}
2014-08-08 14:06:44 +02:00
"-f" = {
set_if = "$snmp_perf$"
2017-06-19 15:22:19 +02:00
description = "Perfparse compatible output"
2014-08-08 14:06:44 +02:00
}
}
vars.snmp_load_type = "stand"
2014-11-26 18:16:55 +01:00
vars.snmp_warn = 85
vars.snmp_crit = 95
2014-08-08 14:06:44 +02:00
vars.snmp_perf = true
}
2017-04-04 17:26:24 +02:00
/**
2014-08-15 14:27:18 +02:00
* Memory and swap usage on Linux given by Net-snmp
* Memory usage on cisco routers or Pix
* For other systems use check_snmp_storage.pl
* Url reference: http://nagios.manubulon.com/snmp_mem.html
*/
2014-08-08 14:06:44 +02:00
object CheckCommand "snmp-memory" {
2014-08-15 14:27:18 +02:00
import "snmp-manubulon-command"
2014-08-08 14:06:44 +02:00
command = [ ManubulonPluginDir + "/check_snmp_mem.pl" ]
arguments += {
"-f" = {
set_if = "$snmp_perf$"
2017-06-19 15:22:19 +02:00
description = "Performance data output"
2014-08-08 14:06:44 +02:00
}
2015-05-22 11:44:28 +02:00
"-I" = {
set_if = "$snmp_is_cisco$"
description = "check cisco memory (sum of all memory pools)"
}
2016-08-29 16:47:39 +02:00
"-E" = {
set_if = "$snmp_is_hp$"
description = "check HP / Procurve memory"
}
2017-10-09 15:51:25 +02:00
"-m" = {
set_if = "$snmp_memcached$"
description = "Include cached memory in used memory"
}
"-b" = {
set_if = "$snmp_membuffer$"
description = "Exclude buffered memory in used memory"
}
2014-08-08 14:06:44 +02:00
}
vars.snmp_warn = "94,50"
vars.snmp_crit = "98,80"
vars.snmp_perf = true
2015-05-22 11:44:28 +02:00
vars.snmp_is_cisco = false
2017-10-09 15:51:25 +02:00
vars.snmp_memcached = false
vars.snmp_membuffer = false
2014-08-08 14:06:44 +02:00
}
2014-08-15 14:27:18 +02:00
/**
* snmp storage - Disk/Memory
* Url reference: http://nagios.manubulon.com/snmp_storage.html
*/
2014-08-08 14:06:44 +02:00
object CheckCommand "snmp-storage" {
2014-08-15 14:27:18 +02:00
import "snmp-manubulon-command"
2014-08-08 14:06:44 +02:00
command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]
arguments += {
2017-06-19 15:22:19 +02:00
"-m" = {
value = "$snmp_storage_name$"
description = "Name in description OID (can be mounpoints '/home' or 'Swap Space'...)"
}
2014-08-08 14:06:44 +02:00
"-f" = {
set_if = "$snmp_perf$"
2017-06-19 15:22:19 +02:00
description = "Perfparse compatible output"
2014-08-08 14:06:44 +02:00
}
2019-01-11 09:54:24 +01:00
"-e" = {
set_if = "$snmp_exclude$"
description = "Select all storages except the one(s) selected by -m. No action on storage type selection."
}
2017-12-21 10:48:34 +01:00
"-o" = {
value = "$snmp_storage_olength$"
description = "Max-size of the SNMP message, usefull in case of Too Long responses."
}
2018-11-02 14:52:37 +01:00
"-q" = {
2018-11-02 14:58:44 +01:00
value = "$snmp_storage_type$"
2018-11-02 14:52:37 +01:00
description = "Storage type: Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk"
}
2014-08-08 14:06:44 +02:00
}
vars.snmp_storage_name = "^/$$"
vars.snmp_warn = 80
vars.snmp_crit = 90
vars.snmp_perf = true
2019-01-11 09:54:24 +01:00
vars.snmp_exclude = false
2014-08-08 14:06:44 +02:00
}
2017-04-04 17:26:24 +02:00
/**
2014-08-15 14:27:18 +02:00
* snmp network interfaces
* Url reference: http://nagios.manubulon.com/snmp_int.html
*/
2014-08-08 14:06:44 +02:00
object CheckCommand "snmp-interface" {
2014-08-15 14:27:18 +02:00
import "snmp-manubulon-command"
2014-08-08 14:06:44 +02:00
command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]
arguments += {
2017-06-19 15:22:19 +02:00
"-n" = {
value = "$snmp_interface$"
description = "Name in description OID (eth0, ppp0 ...). This is treated as a regexp : -n eth will match eth0,eth1,..."
}
2014-08-08 14:06:44 +02:00
"-k" = {
set_if = "$snmp_interface_perf$"
2017-06-19 15:22:19 +02:00
description = "Check the input/ouput bandwidth of the interface"
}
"--label" = {
value = "$snmp_interface_label$"
description = "Add label before speed in output : in=, out=, errors-out=, etc..."
2014-08-08 14:06:44 +02:00
}
2014-11-26 18:16:55 +01:00
"-Y" = {
set_if = "$snmp_interface_bits_bytes$"
2017-06-19 15:22:19 +02:00
description = "Output performance data in bits/s or Bytes/s"
2014-11-26 18:16:55 +01:00
}
"-y" = {
set_if = "$snmp_interface_percent$"
2017-06-19 15:22:19 +02:00
description = "Output performance data in % of max speed"
2014-11-26 18:16:55 +01:00
}
2014-08-08 14:06:44 +02:00
"-B" = {
2014-11-26 18:16:55 +01:00
set_if = "$snmp_interface_kbits$"
2017-06-19 15:22:19 +02:00
description = "Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s"
2014-11-26 18:16:55 +01:00
}
"-M" = {
set_if = "$snmp_interface_megabytes$"
2017-06-19 15:22:19 +02:00
description = "Make the warning and critical levels in Mbps"
2014-08-08 14:06:44 +02:00
}
"--64bits" = {
set_if = "$snmp_interface_64bit$"
2017-06-19 15:22:19 +02:00
description = "Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps"
2014-08-08 14:06:44 +02:00
}
2014-11-26 18:16:55 +01:00
"-e" = {
set_if = "$snmp_interface_errors$"
2017-06-19 15:22:19 +02:00
description = "Add error & discard to Perfparse output"
2014-11-26 18:16:55 +01:00
}
2019-10-31 16:15:10 +01:00
"-q" = {
set_if = "$snmp_interface_extended_checks$"
2019-11-04 09:33:48 +01:00
description = "Also check the error and discard input/output. When enabled format of snmp_warn and snmp_crit changes to <In bytes>,<Out bytes>,<In error>,<Out error>,<In disc>,<Out disc>"
2019-10-31 16:15:10 +01:00
}
2016-12-29 11:53:27 +01:00
"-i" = {
set_if = "$snmp_interface_inverse$"
2017-06-19 15:22:19 +02:00
description = "Make critical when up"
2016-12-29 11:53:27 +01:00
}
2014-11-26 18:16:55 +01:00
"-r" = {
set_if = "$snmp_interface_noregexp$"
2017-06-19 15:22:19 +02:00
description = "Do not use regexp to match NAME in description OID"
}
"-d" = {
value = "$snmp_interface_delta$"
description = "Make an average of <delta> seconds (default 300=5min)"
2014-11-26 18:16:55 +01:00
}
"-u" = {
set_if = "$snmp_interface_warncrit_percent$"
2017-06-19 15:22:19 +02:00
description = "Make the warning and critical levels in % of reported interface speed"
2014-11-26 18:16:55 +01:00
}
2016-06-12 13:45:56 +02:00
"-N" = {
set_if = "$snmp_interface_ifname$"
}
2017-02-07 17:25:47 +01:00
"-A" = {
set_if = "$snmp_interface_ifalias$"
}
2014-08-08 14:06:44 +02:00
"-f" = {
set_if = "$snmp_perf$"
2017-06-19 15:22:19 +02:00
description = "Perfparse compatible output (no output when interface is down)"
2014-08-08 14:06:44 +02:00
}
2017-09-29 22:33:03 +02:00
"-W" = {
set_if = "$snmp_interface_weathermap$"
description = "Include 'weathermap' data for NagVis in performance data"
}
2020-05-12 13:56:22 +02:00
"-a" = {
set_if = "$snmp_interface_admin$"
description = "Use administrative status instead of operational"
}
2014-08-08 14:06:44 +02:00
}
vars.snmp_interface = "eth0"
vars.snmp_interface_perf = true
2014-11-26 18:16:55 +01:00
vars.snmp_interface_bits_bytes = true
vars.snmp_interface_percent = false
vars.snmp_interface_kbits = true
vars.snmp_interface_megabytes = true
2014-08-08 14:06:44 +02:00
vars.snmp_interface_64bit = false
2014-11-26 18:16:55 +01:00
vars.snmp_interface_errors = true
2019-10-31 16:15:10 +01:00
vars.snmp_interface_extended_checks = false
2014-11-26 18:16:55 +01:00
vars.snmp_interface_noregexp = false
vars.snmp_interface_delta = 300
vars.snmp_interface_warncrit_percent = false
2016-06-12 13:45:56 +02:00
vars.snmp_interface_ifname = false
2017-02-07 17:25:47 +01:00
vars.snmp_interface_ifalias = false
2014-08-08 14:06:44 +02:00
vars.snmp_warn = "300,400"
vars.snmp_crit = "0,600"
vars.snmp_perf = true
}
2017-04-04 17:26:24 +02:00
/**
2014-08-15 14:27:18 +02:00
* snmp process
* Url reference: http://nagios.manubulon.com/snmp_process.html
*/
2014-08-08 14:06:44 +02:00
object CheckCommand "snmp-process" {
2014-08-15 14:27:18 +02:00
import "snmp-manubulon-command"
2014-08-08 14:06:44 +02:00
command = [ ManubulonPluginDir + "/check_snmp_process.pl" ]
arguments += {
"-n" = {
value = "$snmp_process_name$"
2017-06-19 15:22:19 +02:00
description = "Regex service name eg. ^apache2$"
2014-08-08 14:06:44 +02:00
}
"-F" = {
set_if = "$snmp_perf$"
2017-06-19 15:22:19 +02:00
description = "Add performance output (outputs : memory_usage, num_process, cpu_usage)"
2014-08-08 14:06:44 +02:00
}
2016-07-20 23:19:09 +02:00
"-A" = {
set_if = "$snmp_process_use_params$"
2017-06-19 15:22:19 +02:00
description = "Add parameters to select processes (ex : 'named.*-t /var/named/chroot' will only select named process with this parameter)"
2016-07-20 23:19:09 +02:00
}
2020-12-16 12:04:03 +01:00
"-f" = {
set_if = "$snmp_process_use_fullpath$"
description = "Use full path name instead of process name to select processes (ex : '/opt/app1/app1bin' will only select named process with this full path)"
}
2017-04-04 17:26:24 +02:00
"-m" = {
set_if = "$snmp_process_mem_usage$"
value = "$snmp_process_mem_threshold$"
2017-06-19 15:22:19 +02:00
description = "Checks memory usage. Values warning and critical in Mb eg. 512,1024"
2017-04-04 17:26:24 +02:00
}
"-u" = {
set_if = "$snmp_process_cpu_usage$"
value = "$snmp_process_cpu_threshold$"
2017-06-19 15:22:19 +02:00
description = "Checks CPU usage. Values warning and critical in % (value can be > 100% : 100%=1 CPU) eg. 15,50"
2017-04-04 17:26:24 +02:00
}
2014-08-08 14:06:44 +02:00
}
vars.snmp_process_name = ".*"
vars.snmp_warn = 0
vars.snmp_crit = 0
vars.snmp_perf = true
2016-07-20 23:19:09 +02:00
vars.snmp_process_use_params = false
2020-12-16 12:04:03 +01:00
vars.snmp_process_use_fullpath = false
2017-04-04 17:26:24 +02:00
vars.snmp_process_mem_usage = false
vars.snmp_process_mem_threshold = "0,0"
vars.snmp_process_cpu_usage = false
vars.snmp_process_cpu_threshold = "0,0"
2014-08-08 14:06:44 +02:00
}
2017-10-13 00:15:53 +02:00
/**
* snmp service
* Url reference: http://nagios.manubulon.com/snmp_windows.html
*/
object CheckCommand "snmp-service" {
import "snmp-manubulon-command"
command = [ ManubulonPluginDir + "/check_snmp_win.pl" ]
arguments += {
"-n" = {
value = "$snmp_service_name$"
description = "Comma separated names of services (perl regular expressions can be used for every one). By default, it is not case sensitive. eg. ^dns$"
}
"-N" = {
value = "$snmp_service_count$"
description = "Compare matching services with <n> instead of the number of names provided."
}
"-s" = {
set_if = "$snmp_service_showall$"
description = "Show all services in the output, instead of only the non-active ones."
}
"-r" = {
set_if = "$snmp_service_noregexp$"
description = "Do not use regexp to match NAME in service description."
}
}
2018-10-31 18:28:27 +01:00
2017-10-13 00:15:53 +02:00
vars.snmp_service_name = ".*"
2017-12-21 10:48:34 +01:00
}