1 /******************************************************************************
3 * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License *
7 * as published by the Free Software Foundation; either version 2 *
8 * of the License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software Foundation *
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ******************************************************************************/
21 * main snmp-manubulon template
24 template CheckCommand "snmp-manubulon-command" {
29 value = "$snmp_address$"
30 description = "Name or IP address of host to check"
33 set_if = "$snmp_nocrypt$"
34 value = "$snmp_community$"
35 description = "Community name for the host's SNMP agent (implies v1 protocol)"
39 description = "SNMP port (Default 161)"
43 description = "Use snmp v2c"
47 value = "$snmp_login$"
48 description = "Login and auth password for snmpv3 authentication"
52 value = "$snmp_password$"
53 description = "Priv password"
56 set_if = "$snmp_v3_use_authprotocol$"
57 value = "$snmp_authprotocol$"
58 description = "<authproto>,<privproto> - <Authentication protocol (md5|sha : default md5)>,<Priv protocole (des|aes : default des)>"
61 set_if = "$snmp_v3_use_privpass$"
62 value = "$snmp_privpass$"
63 description = "Priv password for snmpv3 (AuthPriv protocol)"
72 value = "$snmp_timeout$"
73 description = "Timeout for SNMP in seconds (Default: 5)"
77 vars.snmp_address = "$check_address$"
78 vars.snmp_nocrypt = true
79 vars.snmp_community = "public"
82 vars.snmp_login = "snmpuser"
83 vars.snmp_v3_use_privpass = false
84 vars.snmp_v3_use_authprotocol = false
85 vars.snmp_authprotocol = "md5,des"
86 vars.snmp_timeout = "5"
92 * Url reference: http://nagios.manubulon.com/snmp_env.html
95 object CheckCommand "snmp-env" {
96 import "snmp-manubulon-command"
98 command = [ ManubulonPluginDir + "/check_snmp_env.pl" ]
102 value = "$snmp_env_type$"
103 description = "Environment Type [cisco|nokia|bc|iron|foundry|linux]"
106 value = "$snmp_env_fan$"
107 description = "Minimum fan rpm value (only needed for 'iron' & 'linux')"
110 value = "$snmp_env_celsius$"
111 description = "Maximum temp in degrees celsius (only needed for 'iron' & 'linux')"
114 set_if = "$snmp_perf$"
115 description = "Perfparse compatible output"
119 vars.snmp_env_type = "cisco"
120 vars.snmp_perf = true
126 * Url reference: http://nagios.manubulon.com/snmp_load.html
129 object CheckCommand "snmp-load" {
130 import "snmp-manubulon-command"
132 command = [ ManubulonPluginDir + "/check_snmp_load.pl" ]
136 value = "$snmp_load_type$"
137 description = "CPU check"
140 set_if = "$snmp_perf$"
141 description = "Perfparse compatible output"
145 vars.snmp_load_type = "stand"
148 vars.snmp_perf = true
153 * Memory and swap usage on Linux given by Net-snmp
154 * Memory usage on cisco routers or Pix
155 * For other systems use check_snmp_storage.pl
156 * Url reference: http://nagios.manubulon.com/snmp_mem.html
159 object CheckCommand "snmp-memory" {
160 import "snmp-manubulon-command"
162 command = [ ManubulonPluginDir + "/check_snmp_mem.pl" ]
166 set_if = "$snmp_perf$"
167 description = "Performance data output"
170 set_if = "$snmp_is_cisco$"
171 description = "check cisco memory (sum of all memory pools)"
174 set_if = "$snmp_is_hp$"
175 description = "check HP / Procurve memory"
179 vars.snmp_warn = "94,50"
180 vars.snmp_crit = "98,80"
181 vars.snmp_perf = true
182 vars.snmp_is_cisco = false
187 * snmp storage - Disk/Memory
188 * Url reference: http://nagios.manubulon.com/snmp_storage.html
190 object CheckCommand "snmp-storage" {
191 import "snmp-manubulon-command"
193 command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]
197 value = "$snmp_storage_name$"
198 description = "Name in description OID (can be mounpoints '/home' or 'Swap Space'...)"
201 set_if = "$snmp_perf$"
202 description = "Perfparse compatible output"
206 vars.snmp_storage_name = "^/$$"
209 vars.snmp_perf = true
214 * snmp network interfaces
215 * Url reference: http://nagios.manubulon.com/snmp_int.html
218 object CheckCommand "snmp-interface" {
219 import "snmp-manubulon-command"
221 command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]
225 value = "$snmp_interface$"
226 description = "Name in description OID (eth0, ppp0 ...). This is treated as a regexp : -n eth will match eth0,eth1,..."
229 set_if = "$snmp_interface_perf$"
230 description = "Check the input/ouput bandwidth of the interface"
233 value = "$snmp_interface_label$"
234 description = "Add label before speed in output : in=, out=, errors-out=, etc..."
237 set_if = "$snmp_interface_bits_bytes$"
238 description = "Output performance data in bits/s or Bytes/s"
241 set_if = "$snmp_interface_percent$"
242 description = "Output performance data in % of max speed"
245 set_if = "$snmp_interface_kbits$"
246 description = "Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s"
249 set_if = "$snmp_interface_megabytes$"
250 description = "Make the warning and critical levels in Mbps"
253 set_if = "$snmp_interface_64bit$"
254 description = "Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps"
257 set_if = "$snmp_interface_errors$"
258 description = "Add error & discard to Perfparse output"
261 set_if = "$snmp_interface_inverse$"
262 description = "Make critical when up"
265 set_if = "$snmp_interface_noregexp$"
266 description = "Do not use regexp to match NAME in description OID"
269 value = "$snmp_interface_delta$"
270 description = "Make an average of <delta> seconds (default 300=5min)"
273 set_if = "$snmp_interface_warncrit_percent$"
274 description = "Make the warning and critical levels in % of reported interface speed"
277 set_if = "$snmp_interface_ifname$"
280 set_if = "$snmp_interface_ifalias$"
283 set_if = "$snmp_perf$"
284 description = "Perfparse compatible output (no output when interface is down)"
287 set_if = "$snmp_interface_weathermap$"
288 description = "Include 'weathermap' data for NagVis in performance data"
292 vars.snmp_interface = "eth0"
293 vars.snmp_interface_perf = true
294 vars.snmp_interface_bits_bytes = true
295 vars.snmp_interface_percent = false
296 vars.snmp_interface_kbits = true
297 vars.snmp_interface_megabytes = true
298 vars.snmp_interface_64bit = false
299 vars.snmp_interface_errors = true
300 vars.snmp_interface_noregexp = false
301 vars.snmp_interface_delta = 300
302 vars.snmp_interface_warncrit_percent = false
303 vars.snmp_interface_ifname = false
304 vars.snmp_interface_ifalias = false
305 vars.snmp_warn = "300,400"
306 vars.snmp_crit = "0,600"
307 vars.snmp_perf = true
313 * Url reference: http://nagios.manubulon.com/snmp_process.html
316 object CheckCommand "snmp-process" {
317 import "snmp-manubulon-command"
319 command = [ ManubulonPluginDir + "/check_snmp_process.pl" ]
323 value = "$snmp_process_name$"
324 description = "Regex service name eg. ^apache2$"
327 set_if = "$snmp_perf$"
328 description = "Add performance output (outputs : memory_usage, num_process, cpu_usage)"
331 set_if = "$snmp_process_use_params$"
332 description = "Add parameters to select processes (ex : 'named.*-t /var/named/chroot' will only select named process with this parameter)"
335 set_if = "$snmp_process_mem_usage$"
336 value = "$snmp_process_mem_threshold$"
337 description = "Checks memory usage. Values warning and critical in Mb eg. 512,1024"
340 set_if = "$snmp_process_cpu_usage$"
341 value = "$snmp_process_cpu_threshold$"
342 description = "Checks CPU usage. Values warning and critical in % (value can be > 100% : 100%=1 CPU) eg. 15,50"
346 vars.snmp_process_name = ".*"
349 vars.snmp_perf = true
350 vars.snmp_process_use_params = false
351 vars.snmp_process_mem_usage = false
352 vars.snmp_process_mem_threshold = "0,0"
353 vars.snmp_process_cpu_usage = false
354 vars.snmp_process_cpu_threshold = "0,0"
359 * Url reference: http://nagios.manubulon.com/snmp_windows.html
362 object CheckCommand "snmp-service" {
363 import "snmp-manubulon-command"
365 command = [ ManubulonPluginDir + "/check_snmp_win.pl" ]
369 value = "$snmp_service_name$"
370 description = "Comma separated names of services (perl regular expressions can be used for every one). By default, it is not case sensitive. eg. ^dns$"
373 value = "$snmp_service_count$"
374 description = "Compare matching services with <n> instead of the number of names provided."
377 set_if = "$snmp_service_showall$"
378 description = "Show all services in the output, instead of only the non-active ones."
381 set_if = "$snmp_service_noregexp$"
382 description = "Do not use regexp to match NAME in service description."
386 vars.snmp_service_name = ".*"