1 /******************************************************************************
3 * Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
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 ******************************************************************************/
20 template CheckCommand "ping-common" {
21 import "plugin-check-command"
23 command = [ PluginDir + "/check_ping" ]
26 "-H" = "$ping_address$"
27 "-w" = "$ping_wrta$,$ping_wpl$%"
28 "-c" = "$ping_crta$,$ping_cpl$%"
29 "-p" = "$ping_packets$"
30 "-t" = "$ping_timeout$"
39 object CheckCommand "ping4" {
44 vars.ping_address = "$address$"
47 object CheckCommand "ping6" {
52 vars.ping_address = "$address6$"
55 object CheckCommand "hostalive" {
58 vars.ping_wrta = 3000.0
61 vars.ping_crta = 5000.0
66 template CheckCommand "fping-common" {
67 import "plugin-check-command"
70 PluginDir + "/check_fping",
75 "-w" = "$fping_wrta$,$fping_wpl$%"
76 "-c" = "$fping_crta$,$fping_cpl$%"
77 "-n" = "$fping_number$"
78 "-i" = "$fping_interval$"
79 "-b" = "$fping_bytes$"
80 "-T" = "$fping_target_timeout$"
81 "-S" = "$fping_source_ip$"
82 "-I" = "$fping_source_interface$"
90 vars.fping_interval = 500
93 object CheckCommand "fping4" {
98 vars.fping_address = "$address$"
101 object CheckCommand "fping6" {
102 import "fping-common"
106 vars.fping_address = "$address6$"
109 object CheckCommand "dummy" {
110 import "plugin-check-command"
113 PluginDir + "/check_dummy",
119 vars.dummy_text = "Check was successful."
122 object CheckCommand "passive" {
126 vars.dummy_text = "No Passive Check Result Received."
129 object CheckCommand "tcp" {
130 import "plugin-check-command"
133 PluginDir + "/check_tcp",
134 "-H", "$tcp_address$",
138 vars.tcp_address = "$address$"
141 object CheckCommand "ssl" {
142 import "plugin-check-command"
144 command = [ PluginDir + "/check_tcp" ]
147 "-H" = "$ssl_address$"
150 "--timeout" = "$ssl_timeout$"
151 "-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$"
154 vars.ssl_address = "$address$"
157 object CheckCommand "udp" {
158 import "plugin-check-command"
161 PluginDir + "/check_udp",
162 "-H", "$udp_address$",
166 vars.udp_address = "$address$"
169 object CheckCommand "http" {
170 import "plugin-check-command"
172 command = [ PluginDir + "/check_http" ]
175 "-H" = "$http_vhost$"
176 "-I" = "$http_address$"
180 set_if = "$http_ssl$"
183 set_if = "$http_sni$"
186 value = "$http_certificate$"
187 description = "Minimum number of days a certificate has to be valid. Port defaults to 443."
190 value = "$http_clientcert$"
191 description = "Name of file contains the client certificate (PEM format)"
194 value = "$http_privatekey$"
195 description = "Name of file contains the private key (PEM format)"
198 value = "$http_auth_pair$"
199 description = "Username:password on sites with basic authentication"
202 set_if = "$http_ignore_body$"
204 "-w" = "$http_warn_time$"
205 "-c" = "$http_critical_time$"
206 "-e" = "$http_expect$"
208 value = "$http_headerstring$"
209 description = "String to expect in the response headers"
212 value = "$http_string$"
213 description = "String to expect in the content"
216 value = "$http_post$"
217 description = "URL encoded http POST data"
220 value = "$http_method$"
221 description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
224 value = "$http_maxage$"
225 description = "Warn if document is more than seconds old"
228 value = "$http_contenttype$"
229 description = "Specify Content-Type header when POSTing"
232 set_if = "$http_linespan$"
233 description = "Allow regex to span newline"
237 value = "$http_expect_body_regex$"
238 description = "Search page for regex"
242 value = "$http_expect_body_eregi$"
243 description = "Search page for case-insensitive regex"
247 set_if = "$http_invertregex$"
248 description = "Return CRITICAL if found, OK if not"
251 value = "$http_proxy_auth_pair$"
252 description = "Username:password on proxy-servers with basic authentication"
255 value = "$http_useragent$"
256 description = "String to be sent in http header as User Agent"
259 value = "$http_header$"
260 description = "Any other tags to be sent in http header"
263 set_if = "$http_extendedperfdata$"
264 description = "Print additional perfdata"
267 value = "$http_onredirect$"
268 description = "How to handle redirect pages"
271 value = "$http_pagesize$"
272 description = "Minim page size required:Maximum page size required"
275 value = "$http_timeout$"
276 description = "Seconds before connection times out"
280 vars.http_address = "$address$"
281 vars.http_ssl = false
282 vars.http_sni = false
283 vars.http_linespan = false
284 vars.http_invertregex = false
287 object CheckCommand "ftp" {
288 import "plugin-check-command"
290 command = [ PluginDir + "/check_ftp" ]
293 "-H" = "$ftp_address$"
296 vars.ftp_address = "$address$"
299 object CheckCommand "smtp" {
300 import "plugin-check-command"
302 command = [ PluginDir + "/check_smtp" ]
305 "-H" = "$smtp_address$"
307 "-f" = "$smtp_mail_from$"
310 vars.smtp_address = "$address$"
313 object CheckCommand "ssmtp" {
314 import "plugin-check-command"
316 command = [ PluginDir + "/check_ssmtp" ]
318 "-H" = "$ssmtp_address$"
319 "-p" = "$ssmtp_port$"
320 "-f" = "$ssmtp_mail_from$"
323 vars.ssmtp_address = "$address$"
326 object CheckCommand "imap" {
327 import "plugin-check-command"
329 command = [ PluginDir + "/check_imap" ]
332 "-H" = "$imap_address$"
336 vars.imap_address = "$address$"
339 object CheckCommand "simap" {
340 import "plugin-check-command"
342 command = [ PluginDir + "/check_simap" ]
345 "-H" = "$simap_address$"
346 "-p" = "$simap_port$"
349 vars.simap_address = "$address$"
352 object CheckCommand "pop" {
353 import "plugin-check-command"
355 command = [ PluginDir + "/check_pop" ]
358 "-H" = "$pop_address$"
362 vars.pop_address = "$address$"
365 object CheckCommand "spop" {
366 import "plugin-check-command"
368 command = [ PluginDir + "/check_spop" ]
371 "-H" = "$spop_address$"
375 vars.spop_address = "$address$"
378 object CheckCommand "ntp_time" {
379 import "plugin-check-command"
381 command = [ PluginDir + "/check_ntp_time" ]
384 "-H" = "$ntp_address$"
387 vars.ntp_address = "$address$"
390 object CheckCommand "ssh" {
391 import "plugin-check-command"
393 command = [ PluginDir + "/check_ssh" ]
397 "-t" = "$ssh_timeout$"
399 value = "$ssh_address$"
405 vars.ssh_address = "$address$"
408 object CheckCommand "disk" {
409 import "plugin-check-command"
411 command = [ PluginDir + "/check_disk" ]
414 "-w" = "$disk_wfree$%"
415 "-c" = "$disk_cfree$%"
422 object CheckCommand "users" {
423 import "plugin-check-command"
425 command = [ PluginDir + "/check_users" ]
428 "-w" = "$users_wgreater$"
429 "-c" = "$users_cgreater$"
432 vars.users_wgreater = 20
433 vars.users_cgreater = 50
436 object CheckCommand "procs" {
437 import "plugin-check-command"
439 command = [ PluginDir + "/check_procs" ]
443 value = "$procs_warning$"
444 description = "Generate warning state if metric is outside this range"
447 value = "$procs_critical$"
448 description = "Generate critical state if metric is outside this range"
451 value = "$procs_metric$"
452 description = "Check thresholds against metric"
455 value = "$procs_timeout$"
456 description = "Seconds before plugin times out"
459 set_if = "$procs_traditional$"
460 description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
463 value = "$procs_state$"
464 description = "Only scan for processes that have one or more of the status flags you specify"
467 value = "$procs_ppid$"
468 description = "Only scan for children of the parent process ID indicated"
471 value = "$procs_vsz$"
472 description = "Only scan for processes with VSZ higher than indicated"
475 value = "$procs_rss$"
476 description = "Only scan for processes with RSS higher than indicated"
479 value = "$procs_pcpu$"
480 description = "Only scan for processes with PCPU higher than indicated"
483 value = "$procs_user$"
484 description = "Only scan for processes with user name or ID indicated"
487 value = "$procs_argument$"
488 description = "Only scan for processes with args that contain STRING"
490 "--ereg-argument-array" = {
491 value = "$procs_argument_regex$"
492 description = "Only scan for processes with args that contain the regex STRING"
495 value = "$procs_command$"
496 description = "Only scan for exact matches of COMMAND (without path)"
499 set_if = "$procs_nokthreads$"
500 description = "Only scan for non kernel threads"
504 vars.procs_traditional = false
505 vars.procs_nokthreads = false
506 vars.procs_warning = 250
507 vars.procs_critical = 400
510 object CheckCommand "swap" {
511 import "plugin-check-command"
513 command = [ PluginDir + "/check_swap" ]
516 "-w" = "$swap_wfree$%"
517 "-c" = "$swap_cfree$%"
524 object CheckCommand "load" {
525 import "plugin-check-command"
527 command = [ PluginDir + "/check_load" ]
530 "-w" = "$load_wload1$,$load_wload5$,$load_wload15$"
531 "-c" = "$load_cload1$,$load_cload5$,$load_cload15$"
534 vars.load_wload1 = 5.0
535 vars.load_wload5 = 4.0
536 vars.load_wload15 = 3.0
538 vars.load_cload1 = 10.0
539 vars.load_cload5 = 6.0
540 vars.load_cload15 = 4.0
543 object CheckCommand "snmp" {
544 import "plugin-check-command"
546 command = [ PluginDir + "/check_snmp" ]
549 "-H" = "$snmp_address$"
551 "-C" = "$snmp_community$"
554 "-s" = "$snmp_string$"
556 "-R" = "$snmp_eregi$"
557 "-l" = "$snmp_label$"
558 "-u" = "$snmp_units$"
559 "--invert-search" = {
560 set_if = "$snmp_invert_search$"
561 description = "Invert search result and return CRITICAL if found"
565 vars.snmp_address = "$address$"
566 vars.snmp_community = "public"
567 vars.snmp_invert_search = false
570 object CheckCommand "snmpv3" {
571 import "plugin-check-command"
573 command = [ PluginDir + "/check_snmp" ]
576 "-H" = "$snmpv3_address$"
578 "--seclevel" = "authPriv"
579 "-U" = "$snmpv3_user$"
580 "-a" = "$snmpv3_auth_alg$"
581 "-A" = "$snmpv3_auth_key$"
582 "-x" = "$snmpv3_priv_alg$"
583 "-X" = "$snmpv3_priv_key$"
584 "-o" = "$snmpv3_oid$"
585 "-c" = "$snmpv3_crit$"
586 "-w" = "$snmpv3_warn$"
589 vars.snmpv3_address = "$address$"
590 vars.snmpv3_auth_alg = "SHA"
591 vars.snmpv3_priv_alg = "AES"
594 object CheckCommand "snmp-uptime" {
597 vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
600 object CheckCommand "apt" {
601 import "plugin-check-command"
603 command = [ PluginDir + "/check_apt" ]
606 object CheckCommand "dhcp" {
607 import "plugin-check-command"
609 command = [ PluginDir + "/check_dhcp" ]
612 "-s" = "$dhcp_serverip$"
613 "-r" = "$dhcp_requestedip$"
614 "-t" = "$dhcp_timeout$"
615 "-i" = "$dhcp_interface$"
618 set_if = "$dhcp_unicast$"
622 vars.dhcp_unicast = false
625 object CheckCommand "dns" {
626 import "plugin-check-command"
628 command = [ PluginDir + "/check_dns" ]
631 "-H" = "$dns_lookup$"
632 "-s" = "$dns_server$"
633 "-a" = "$dns_expected_answer$"
635 set_if = "$dns_authoritative$"
639 vars.dns_lookup = "$host_name$"
640 vars.dns_expected_answer = "$address$"
643 object CheckCommand "dig" {
644 import "plugin-check-command"
646 command = [ PluginDir + "/check_dig" ]
649 "-H" = "$dig_server$"
650 "-l" = "$dig_lookup$"
653 vars.dig_server = "$address$"
656 object CheckCommand "nscp" {
657 import "plugin-check-command"
659 command = [ PluginDir + "/check_nt" ]
662 "-H" = "$nscp_address$"
664 "-s" = "$nscp_password$"
666 value = "$nscp_variable$"
669 "-l" = "$nscp_params$"
672 "-t" = "$nscp_timeout$"
675 vars.nscp_address = "$address$"
676 vars.nscp_port = 12489
679 object CheckCommand "by_ssh" {
680 import "plugin-check-command"
682 command = [ PluginDir + "/check_by_ssh" ]
685 "-H" = "$by_ssh_address$"
686 "-p" = "$by_ssh_port$"
687 "-C" = "$by_ssh_command$"
688 "-l" = "$by_ssh_logname$"
689 "-i" = "$by_ssh_identity$"
691 set_if = "$by_ssh_quiet$"
693 "-w" = "$by_ssh_warn$"
694 "-c" = "$by_ssh_crit$"
695 "-t" = "$by_ssh_timeout$"
698 vars.by_ssh_address = "$address$"
699 vars.by_ssh_quiet = false
702 object CheckCommand "ups" {
703 import "plugin-check-command"
705 command = [ PluginDir + "/check_ups" ]
708 "-H" = "$ups_address$"
712 vars.ups_address = "$address$"
713 vars.ups_name = "ups"
716 object CheckCommand "nrpe" {
717 import "plugin-check-command"
719 command = [ PluginDir + "/check_nrpe" ]
722 "-H" = "$nrpe_address$"
724 "-c" = "$nrpe_command$"
726 set_if = "$nrpe_no_ssl$"
727 description = "Do not use SSL."
730 set_if = "$nrpe_timeout_unknown$"
731 description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
733 "-t" = "$nrpe_timeout$"
736 vars.nrpe_address = "$address$"
737 vars.nrpe_no_ssl = false
738 vars.nrpe_timeout_unknown = false
741 /* Contrib plugins */
742 object CheckCommand "running_kernel" {
743 import "plugin-check-command"
745 command = [ "sudo", PluginDir + "/check_running_kernel" ]