2014-08-15 14:27:18 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
2016-01-12 08:29:59 +01:00
|
|
|
* Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/) *
|
2014-08-15 14:27:18 +02:00
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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 = {
|
|
|
|
"-H" = "$snmp_address$"
|
|
|
|
"-C" = {
|
|
|
|
set_if = "$snmp_nocrypt$"
|
|
|
|
value = "$snmp_community$"
|
|
|
|
}
|
|
|
|
"-p" = "$snmp_port$"
|
2014-10-09 22:57:35 +02:00
|
|
|
"-2" = {
|
2014-08-08 14:06:44 +02:00
|
|
|
set_if = "$snmp_v2$"
|
|
|
|
}
|
|
|
|
"-l" = {
|
|
|
|
set_if = "$snmp_v3$"
|
|
|
|
value = "$snmp_login$"
|
|
|
|
}
|
|
|
|
"-x" = {
|
|
|
|
set_if = "$snmp_v3$"
|
|
|
|
value = "$snmp_password$"
|
|
|
|
}
|
|
|
|
"-L" = {
|
|
|
|
set_if = "$snmp_v3_use_authprotocol$"
|
|
|
|
value = "$snmp_authprotocol$"
|
|
|
|
}
|
|
|
|
"-X" = {
|
|
|
|
set_if = "$snmp_v3_use_privpass$"
|
|
|
|
value = "$snmp_privpass$"
|
|
|
|
}
|
|
|
|
|
|
|
|
"-w" = "$snmp_warn$"
|
|
|
|
"-c" = "$snmp_crit$"
|
2014-12-11 22:16:58 +01:00
|
|
|
"-t" = "$snmp_timeout$"
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
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 += {
|
|
|
|
"-T" = "$snmp_load_type$"
|
|
|
|
"-f" = {
|
|
|
|
set_if = "$snmp_perf$"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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$"
|
|
|
|
}
|
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"
|
|
|
|
}
|
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
|
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 += {
|
|
|
|
"-m" = "$snmp_storage_name$"
|
|
|
|
"-f" = {
|
|
|
|
set_if = "$snmp_perf$"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.snmp_storage_name = "^/$$"
|
|
|
|
vars.snmp_warn = 80
|
|
|
|
vars.snmp_crit = 90
|
|
|
|
vars.snmp_perf = true
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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 += {
|
|
|
|
"-n" = "$snmp_interface$"
|
|
|
|
"-k" = {
|
|
|
|
set_if = "$snmp_interface_perf$"
|
|
|
|
}
|
2014-11-26 19:45:40 +01:00
|
|
|
"--label" = "$snmp_interface_label$"
|
2014-11-26 18:16:55 +01:00
|
|
|
"-Y" = {
|
|
|
|
set_if = "$snmp_interface_bits_bytes$"
|
|
|
|
}
|
|
|
|
"-y" = {
|
|
|
|
set_if = "$snmp_interface_percent$"
|
|
|
|
}
|
2014-08-08 14:06:44 +02:00
|
|
|
"-B" = {
|
2014-11-26 18:16:55 +01:00
|
|
|
set_if = "$snmp_interface_kbits$"
|
|
|
|
}
|
|
|
|
"-M" = {
|
|
|
|
set_if = "$snmp_interface_megabytes$"
|
2014-08-08 14:06:44 +02:00
|
|
|
}
|
|
|
|
"--64bits" = {
|
|
|
|
set_if = "$snmp_interface_64bit$"
|
|
|
|
}
|
2014-11-26 18:16:55 +01:00
|
|
|
"-e" = {
|
|
|
|
set_if = "$snmp_interface_errors$"
|
|
|
|
}
|
|
|
|
"-r" = {
|
|
|
|
set_if = "$snmp_interface_noregexp$"
|
|
|
|
}
|
|
|
|
"-d" = "$snmp_interface_delta$"
|
|
|
|
"-u" = {
|
|
|
|
set_if = "$snmp_interface_warncrit_percent$"
|
|
|
|
}
|
2016-06-12 13:45:56 +02:00
|
|
|
"-N" = {
|
|
|
|
set_if = "$snmp_interface_ifname$"
|
|
|
|
}
|
2014-08-08 14:06:44 +02:00
|
|
|
"-f" = {
|
|
|
|
set_if = "$snmp_perf$"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
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
|
2014-08-08 14:06:44 +02:00
|
|
|
vars.snmp_warn = "300,400"
|
|
|
|
vars.snmp_crit = "0,600"
|
|
|
|
vars.snmp_perf = true
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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" = {
|
|
|
|
description = "Regex service name eg. ^apache2$"
|
|
|
|
value = "$snmp_process_name$"
|
|
|
|
}
|
|
|
|
"-F" = {
|
|
|
|
set_if = "$snmp_perf$"
|
|
|
|
}
|
2016-07-20 23:19:09 +02:00
|
|
|
"-A" = {
|
|
|
|
set_if = "$snmp_process_use_params$"
|
|
|
|
}
|
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
|
2014-08-08 14:06:44 +02:00
|
|
|
}
|
|
|
|
|