]> granicus.if.org Git - icinga2/blob - itl/command-plugins-manubulon.conf
Merge pull request #6502 from jenslink/patch-2
[icinga2] / itl / command-plugins-manubulon.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
4  *                                                                            *
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.                     *
9  *                                                                            *
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.                               *
14  *                                                                            *
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  ******************************************************************************/
19
20 /**
21  * main snmp-manubulon template
22  */
23
24 template CheckCommand "snmp-manubulon-command" {
25         import "ipv4-or-ipv6"
26
27         arguments = {
28                 "-H" = {
29                         value = "$snmp_address$"
30                         description = "Name or IP address of host to check"
31                 }
32                 "-C" = {
33                         set_if = "$snmp_nocrypt$"
34                         value = "$snmp_community$"
35                         description = "Community name for the host's SNMP agent (implies v1 protocol)"
36                 }
37                 "-p" = {
38                         value = "$snmp_port$"
39                         description = "SNMP port (Default 161)"
40                 }
41                 "-2" = {
42                         set_if = "$snmp_v2$"
43                         description = "Use snmp v2c"
44                 }
45                 "-l" = {
46                         set_if = "$snmp_v3$"
47                         value = "$snmp_login$"
48                         description = "Login and auth password for snmpv3 authentication"
49                 }
50                 "-x" = {
51                         set_if = "$snmp_v3$"
52                         value = "$snmp_password$"
53                         description = "Priv password"
54                 }
55                 "-L" = {
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)>"
59                 }
60                 "-X" = {
61                         set_if = "$snmp_v3_use_privpass$"
62                         value = "$snmp_privpass$"
63                         description = "Priv password for snmpv3 (AuthPriv protocol)"
64                 }
65                 "-w" = {
66                         value = "$snmp_warn$"
67                 }
68                 "-c" = {
69                         value = "$snmp_crit$"
70                 }
71                 "-t" = {
72                         value = "$snmp_timeout$"
73                         description = "Timeout for SNMP in seconds (Default: 5)"
74                 }
75         }
76
77         vars.snmp_address = "$check_address$"
78         vars.snmp_nocrypt = true
79         vars.snmp_community = "public"
80         vars.snmp_v2 = false
81         vars.snmp_v3 = false
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"
87 }
88
89
90 /**
91  * snmp env
92  *   Url reference: http://nagios.manubulon.com/snmp_env.html
93  */
94
95 object CheckCommand "snmp-env" {
96         import "snmp-manubulon-command"
97
98         command = [ ManubulonPluginDir + "/check_snmp_env.pl" ]
99
100         arguments += {
101                 "-T" = {
102                         value = "$snmp_env_type$"
103                         description = "Environment Type [cisco|nokia|bc|iron|foundry|linux]"
104                 }
105                 "-F" = {
106                         value = "$snmp_env_fan$"
107                         description = "Minimum fan rpm value (only needed for 'iron' & 'linux')"
108                 }
109                 "-c" = {
110                         value = "$snmp_env_celsius$"
111                         description = "Maximum temp in degrees celsius (only needed for 'iron' & 'linux')"
112                 }
113                 "-f" = {
114                         set_if = "$snmp_perf$"
115                         description = "Perfparse compatible output"
116                 }
117         }
118
119         vars.snmp_env_type = "cisco"
120         vars.snmp_perf = true
121 }
122
123
124 /**
125  * snmp load
126  *   Url reference: http://nagios.manubulon.com/snmp_load.html
127  */
128
129 object CheckCommand "snmp-load" {
130         import "snmp-manubulon-command"
131
132         command = [ ManubulonPluginDir + "/check_snmp_load.pl" ]
133
134         arguments += {
135                 "-T" = {
136                         value = "$snmp_load_type$"
137                         description = "CPU check"
138                 }
139                 "-f" = {
140                         set_if = "$snmp_perf$"
141                         description = "Perfparse compatible output"
142                 }
143         }
144
145         vars.snmp_load_type = "stand"
146         vars.snmp_warn = 85
147         vars.snmp_crit = 95
148         vars.snmp_perf = true
149 }
150
151
152 /**
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
157  */
158
159 object CheckCommand "snmp-memory" {
160         import "snmp-manubulon-command"
161
162         command = [ ManubulonPluginDir + "/check_snmp_mem.pl" ]
163
164         arguments += {
165                 "-f" = {
166                         set_if = "$snmp_perf$"
167                         description = "Performance data output"
168                 }
169                 "-I" = {
170                         set_if = "$snmp_is_cisco$"
171                         description = "check cisco memory (sum of all memory pools)"
172                 }
173                 "-E" = {
174                         set_if = "$snmp_is_hp$"
175                         description = "check HP / Procurve memory"
176                 }
177                 "-m" = {
178                         set_if = "$snmp_memcached$"
179                         description = "Include cached memory in used memory"
180                 }
181                 "-b" = {
182                         set_if = "$snmp_membuffer$"
183                         description = "Exclude buffered memory in used memory"
184                 }
185         }
186
187         vars.snmp_warn = "94,50"
188         vars.snmp_crit = "98,80"
189         vars.snmp_perf = true
190         vars.snmp_is_cisco = false
191         vars.snmp_memcached = false
192         vars.snmp_membuffer = false
193 }
194
195
196 /**
197  * snmp storage - Disk/Memory
198  *   Url reference: http://nagios.manubulon.com/snmp_storage.html
199  */
200 object CheckCommand "snmp-storage" {
201         import "snmp-manubulon-command"
202
203         command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]
204
205         arguments += {
206                 "-m" = {
207                         value = "$snmp_storage_name$"
208                         description = "Name in description OID (can be mounpoints '/home' or 'Swap Space'...)"
209                 }
210                 "-f" = {
211                         set_if = "$snmp_perf$"
212                         description = "Perfparse compatible output"
213                 }
214                 "-o" = {
215                         value = "$snmp_storage_olength$"
216                         description = "Max-size of the SNMP message, usefull in case of Too Long responses."
217                 }
218         }
219
220         vars.snmp_storage_name = "^/$$"
221         vars.snmp_warn = 80
222         vars.snmp_crit = 90
223         vars.snmp_perf = true
224 }
225
226
227 /**
228  * snmp network interfaces
229  *   Url reference: http://nagios.manubulon.com/snmp_int.html
230  */
231
232 object CheckCommand "snmp-interface" {
233         import "snmp-manubulon-command"
234
235         command = [ ManubulonPluginDir + "/check_snmp_int.pl" ]
236
237         arguments += {
238                 "-n" = {
239                         value = "$snmp_interface$"
240                         description = "Name in description OID (eth0, ppp0 ...). This is treated as a regexp : -n eth will match eth0,eth1,..."
241                 }
242                 "-k" = {
243                         set_if = "$snmp_interface_perf$"
244                         description = "Check the input/ouput bandwidth of the interface"
245                 }
246                 "--label" = {
247                         value = "$snmp_interface_label$"
248                         description = "Add label before speed in output : in=, out=, errors-out=, etc..."
249                 }
250                 "-Y" = {
251                         set_if = "$snmp_interface_bits_bytes$"
252                         description = "Output performance data in bits/s or Bytes/s"
253                 }
254                 "-y" = {
255                         set_if = "$snmp_interface_percent$"
256                         description = "Output performance data in % of max speed"
257                 }
258                 "-B" = {
259                         set_if = "$snmp_interface_kbits$"
260                         description = "Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s"
261                 }
262                 "-M" = {
263                         set_if = "$snmp_interface_megabytes$"
264                         description = "Make the warning and critical levels in Mbps"
265                 }
266                 "--64bits" = {
267                         set_if = "$snmp_interface_64bit$"
268                         description = "Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps"
269                 }
270                 "-e" = {
271                         set_if = "$snmp_interface_errors$"
272                         description = "Add error & discard to Perfparse output"
273                 }
274                 "-i" = {
275                         set_if = "$snmp_interface_inverse$"
276                         description = "Make critical when up"
277                 }
278                 "-r" = {
279                         set_if = "$snmp_interface_noregexp$"
280                         description = "Do not use regexp to match NAME in description OID"
281                 }
282                 "-d" = {
283                         value = "$snmp_interface_delta$"
284                         description = "Make an average of <delta> seconds (default 300=5min)"
285                 }
286                 "-u" = {
287                         set_if = "$snmp_interface_warncrit_percent$"
288                         description = "Make the warning and critical levels in % of reported interface speed"
289                 }
290                 "-N" = {
291                         set_if = "$snmp_interface_ifname$"
292                 }
293                 "-A" = {
294                         set_if = "$snmp_interface_ifalias$"
295                 }
296                 "-f" = {
297                         set_if = "$snmp_perf$"
298                         description = "Perfparse compatible output (no output when interface is down)"
299                 }
300                 "-W" = {
301                         set_if = "$snmp_interface_weathermap$"
302                         description = "Include 'weathermap' data for NagVis in performance data"
303                 }
304         }
305
306         vars.snmp_interface = "eth0"
307         vars.snmp_interface_perf = true
308         vars.snmp_interface_bits_bytes = true
309         vars.snmp_interface_percent = false
310         vars.snmp_interface_kbits = true
311         vars.snmp_interface_megabytes = true
312         vars.snmp_interface_64bit = false
313         vars.snmp_interface_errors = true
314         vars.snmp_interface_noregexp = false
315         vars.snmp_interface_delta = 300
316         vars.snmp_interface_warncrit_percent = false
317         vars.snmp_interface_ifname = false
318         vars.snmp_interface_ifalias = false
319         vars.snmp_warn = "300,400"
320         vars.snmp_crit = "0,600"
321         vars.snmp_perf = true
322 }
323
324
325 /**
326  * snmp process
327  *   Url reference: http://nagios.manubulon.com/snmp_process.html
328  */
329
330 object CheckCommand "snmp-process" {
331         import "snmp-manubulon-command"
332
333         command = [ ManubulonPluginDir + "/check_snmp_process.pl" ]
334
335         arguments += {
336                 "-n" = {
337                         value = "$snmp_process_name$"
338                         description = "Regex service name eg. ^apache2$"
339                 }
340                 "-F" = {
341                         set_if = "$snmp_perf$"
342                         description = "Add performance output (outputs : memory_usage, num_process, cpu_usage)"
343                 }
344                 "-A" = {
345                         set_if = "$snmp_process_use_params$"
346                         description = "Add parameters to select processes (ex : 'named.*-t /var/named/chroot' will only select named process with this parameter)"
347                 }
348                 "-m" = {
349                         set_if = "$snmp_process_mem_usage$"
350                         value = "$snmp_process_mem_threshold$"
351                         description = "Checks memory usage. Values warning and critical in Mb eg. 512,1024"
352                 }
353                 "-u" = {
354                         set_if = "$snmp_process_cpu_usage$"
355                         value = "$snmp_process_cpu_threshold$"
356                         description = "Checks CPU usage. Values warning and critical in % (value can be > 100% : 100%=1 CPU) eg. 15,50"
357                 }
358         }
359
360         vars.snmp_process_name = ".*"
361         vars.snmp_warn = 0
362         vars.snmp_crit = 0
363         vars.snmp_perf = true
364         vars.snmp_process_use_params = false
365         vars.snmp_process_mem_usage = false
366         vars.snmp_process_mem_threshold = "0,0"
367         vars.snmp_process_cpu_usage = false
368         vars.snmp_process_cpu_threshold = "0,0"
369 }
370
371 /**
372  * snmp service
373  *   Url reference: http://nagios.manubulon.com/snmp_windows.html
374  */
375
376 object CheckCommand "snmp-service" {
377         import "snmp-manubulon-command"
378
379         command = [ ManubulonPluginDir + "/check_snmp_win.pl" ]
380
381         arguments += {
382                 "-n" = {
383                         value = "$snmp_service_name$"
384                         description = "Comma separated names of services (perl regular expressions can be used for every one). By default, it is not case sensitive. eg. ^dns$"
385                 }
386                 "-N" = {
387                         value = "$snmp_service_count$"
388                         description = "Compare matching services with <n> instead of the number of names provided."
389                 }
390                 "-s" = {
391                         set_if = "$snmp_service_showall$"
392                         description = "Show all services in the output, instead of only the non-active ones."
393                 }
394                 "-r" = {
395                         set_if = "$snmp_service_noregexp$"
396                         description = "Do not use regexp to match NAME in service description."
397                 }
398         }
399         
400         vars.snmp_service_name = ".*"
401 }