1 /******************************************************************************
3 * Copyright (C) 2012-2018 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 ******************************************************************************/
20 template CheckCommand "ipv4-or-ipv6" {
21 vars.check_address = {{
22 var addr_v4 = macro("$address$")
23 var addr_v6 = macro("$address6$")
25 if (addr_v4 && !macro("$check_ipv6$") || macro("$check_ipv4$")) {
32 vars.check_ipv4 = false
33 vars.check_ipv6 = false
36 template CheckCommand "ping-common" {
37 command = [ PluginDir + "/check_ping" ]
41 value = "$ping_address$"
42 description = "host to ping"
45 value = "$ping_wrta$,$ping_wpl$%"
46 description = "warning threshold pair"
49 value = "$ping_crta$,$ping_cpl$%"
50 description = "critical threshold pair"
53 value = "$ping_packets$"
54 description = "number of ICMP ECHO packets to send (Default: 5)"
57 value = "$ping_timeout$"
58 description = "Seconds before connection times out (default: 10)"
68 object CheckCommand "ping" {
72 vars.ping_address = "$check_address$"
75 object CheckCommand "ping4" {
80 vars.ping_address = "$address$"
83 object CheckCommand "ping6" {
88 vars.ping_address = "$address6$"
91 template CheckCommand "hostalive-common" {
92 vars.ping_wrta = 3000.0
95 vars.ping_crta = 5000.0
99 object CheckCommand "hostalive" {
101 import "hostalive-common"
104 object CheckCommand "hostalive4" {
106 import "hostalive-common"
109 object CheckCommand "hostalive6" {
111 import "hostalive-common"
114 template CheckCommand "fping-common" {
116 PluginDir + "/check_fping",
122 value = "$fping_wrta$,$fping_wpl$%"
123 description = "warning threshold pair"
126 value = "$fping_crta$,$fping_cpl$%"
127 description = "critical threshold pair"
130 value = "$fping_number$"
131 description = "number of ICMP packets to send (default: 1)"
134 value = "$fping_interval$"
135 description = "Interval (ms) between sending packets (default: fping's default for -p)"
138 value = "$fping_bytes$"
139 description = "size of ICMP packet (default: 56)"
142 value = "$fping_target_timeout$"
143 description = "Target timeout (ms) (default: fping's default for -t)"
146 value = "$fping_source_ip$"
147 description = "name or IP Address of sourceip"
150 value = "$fping_source_interface$"
151 description = "source interface name"
155 vars.fping_wrta = 100
157 vars.fping_crta = 200
159 vars.fping_number = 5
160 vars.fping_interval = 500
163 object CheckCommand "fping4" {
164 import "fping-common"
168 vars.fping_address = "$address$"
171 object CheckCommand "fping6" {
172 import "fping-common"
176 vars.fping_address = "$address6$"
179 object CheckCommand "passive" {
183 vars.dummy_text = "No Passive Check Result Received."
186 object CheckCommand "tcp" {
187 import "ipv4-or-ipv6"
189 command = [ PluginDir + "/check_tcp" ]
193 value = "$tcp_address$"
194 description = "Host name, IP Address, or unix socket (must be an absolute path)."
198 description = "The TCP port number."
201 value = "$tcp_expect$"
202 description = "String to expect in server response (may be repeated)."
206 description = "All expect strings need to occur in server response. Defaults to false."
211 set_if = "$tcp_escape_send$"
212 description = "Enable usage of \n, \r, \t or \\ in send string."
217 description = "String to send to the server."
222 set_if = "$tcp_escape_quit$"
223 description = "Enable usage of \n, \r, \t or \\ in quit string."
228 description = "String to send server to initiate a clean close of the connection."
231 value = "$tcp_refuse$"
232 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
235 value = "$tcp_mismatch$"
236 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
239 set_if = "$tcp_jail$"
240 description = "Hide output from TCP socket."
243 value = "$tcp_maxbytes$"
244 description = "Close connection once more than this number of bytes are received."
247 value = "$tcp_delay$"
248 description = "Seconds to wait between sending string and polling for response."
251 value = "$tcp_certificate$"
252 description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
256 description = "Use SSL for the connection."
259 value = "$tcp_wtime$"
260 description = "Response time to result in warning status (seconds)."
263 value = "$tcp_ctime$"
264 description = "Response time to result in critical status (seconds)."
267 value = "$tcp_timeout$"
268 description = "Seconds before connection times out. Defaults to 10."
271 set_if = "$tcp_ipv4$"
272 description = "Use IPv4 connection"
275 set_if = "$tcp_ipv6$"
276 description = "Use IPv6 connection"
280 vars.tcp_address = "$check_address$"
282 vars.tcp_refuse = "crit"
283 vars.tcp_mismatch = "warn"
284 vars.tcp_timeout = 10
285 vars.check_ipv4 = "$tcp_ipv4$"
286 vars.check_ipv6 = "$tcp_ipv6$"
289 object CheckCommand "ssl" {
290 import "ipv4-or-ipv6"
292 command = [ PluginDir + "/check_tcp" ]
296 value = "$ssl_address$"
297 description = "Host address"
301 description ="TCP port (default: 443)"
304 description = "Use SSL for the connection"
307 value = "$ssl_timeout$"
308 description = "Seconds before connection times out (default: 10)"
311 var days_warn = macro("$ssl_cert_valid_days_warn$")
312 var days_critical = macro("$ssl_cert_valid_days_critical$")
315 return days_warn + "," + days_critical
323 description = "Enable SSL/TLS hostname extension support (SNI)"
327 vars.ssl_address = "$check_address$"
329 vars.ssl_cert_valid_days_warn = false
330 vars.ssl_cert_valid_days_critical = false
334 object CheckCommand "udp" {
335 import "ipv4-or-ipv6"
338 PluginDir + "/check_udp",
339 "-H", "$udp_address$",
347 description = "String to send to the server"
350 value = "$udp_expect$"
352 description = " String to expect in server response"
356 description = "String to send server to initiate a clean close of the connection"
359 set_if = "$udp_ipv4$"
360 description = "Use IPv4 connection"
363 set_if = "$udp_ipv6$"
364 description = "Use IPv6 connection"
368 vars.udp_address = "$check_address$"
369 vars.check_ipv4 = "$udp_ipv4$"
370 vars.check_ipv6 = "$udp_ipv6$"
373 object CheckCommand "http" {
374 import "ipv4-or-ipv6"
376 command = [ PluginDir + "/check_http" ]
380 value = "$http_vhost$"
381 description = "Host name argument for servers using host headers (virtual host)"
384 value = "$http_address$"
385 description = "IP address or name (use numeric address if possible to bypass DNS lookup)"
389 description = "URL to GET or POST (default: /)"
392 value = "$http_port$"
393 description = "Port number (default: 80)"
396 set_if = "$http_ssl$"
397 description = "Connect via SSL"
400 set_if = "$http_ssl_force_tlsv1$"
401 description = "Connect via SSL version TLSv1"
404 set_if = "$http_ssl_force_tlsv1_1$"
405 description = "Connect via SSL version TLSv1.1"
408 set_if = "$http_ssl_force_tlsv1_2$"
409 description = "Connect via SSL version TLSv1.2"
412 set_if = "$http_ssl_force_sslv2$"
413 description = "Connect via SSL version SSLv2"
416 set_if = "$http_ssl_force_sslv3$"
417 description = "Connect via SSL version SSLv3"
420 set_if = "$http_ssl_force_tlsv1_or_higher$"
421 description = "Connect via SSL version TLSv1 and newer"
424 set_if = "$http_ssl_force_tlsv1_1_or_higher$"
425 description = "Connect via SSL version TLSv1.1 and newer"
428 set_if = "$http_ssl_force_tlsv1_2_or_higher$"
429 description = "Connect via SSL version TLSv1.2 and newer"
432 set_if = "$http_ssl_force_sslv2_or_higher$"
433 description = "Connect via SSL version SSLv2 and newer"
436 set_if = "$http_ssl_force_sslv3_or_higher$"
437 description = "Connect via SSL version SSLv3 and newer"
440 set_if = "$http_sni$"
441 description = "Enable SSL/TLS hostname extension support (SNI)"
444 value = "$http_certificate$"
445 description = "Minimum number of days a certificate has to be valid. This parameter explicitely sets the port to 443 and ignores the URL if passed."
448 value = "$http_clientcert$"
449 description = "Name of file contains the client certificate (PEM format)"
452 value = "$http_privatekey$"
453 description = "Name of file contains the private key (PEM format)"
456 value = "$http_auth_pair$"
457 description = "Username:password on sites with basic authentication"
460 set_if = "$http_ignore_body$"
461 description = "Don't wait for document body: stop reading after headers"
464 value = "$http_warn_time$"
465 description = "Response time to result in warning status (seconds)"
468 value = "$http_critical_time$"
469 description = "Response time to result in critical status (seconds)"
472 value = "$http_expect$"
473 description = "Comma-delimited list of strings, at least one of them is expected in the first (status) line of the server response (default: HTTP/1.)"
476 value = "$http_headerstring$"
477 description = "String to expect in the response headers"
480 value = "$http_string$"
481 description = "String to expect in the content"
484 value = "$http_post$"
485 description = "URL encoded http POST data"
488 value = "$http_method$"
489 description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
492 value = "$http_maxage$"
493 description = "Warn if document is more than seconds old"
496 value = "$http_contenttype$"
497 description = "Specify Content-Type header when POSTing"
500 set_if = "$http_linespan$"
501 description = "Allow regex to span newline"
505 value = "$http_expect_body_regex$"
506 description = "Search page for regex"
510 value = "$http_expect_body_eregi$"
511 description = "Search page for case-insensitive regex"
515 set_if = "$http_invertregex$"
516 description = "Return CRITICAL if found, OK if not"
519 value = "$http_proxy_auth_pair$"
520 description = "Username:password on proxy-servers with basic authentication"
523 value = "$http_useragent$"
524 description = "String to be sent in http header as User Agent"
527 value = "$http_header$"
528 description = "Any other tags to be sent in http header"
531 set_if = "$http_extendedperfdata$"
532 description = "Print additional perfdata"
535 value = "$http_onredirect$"
536 description = "How to handle redirect pages"
539 value = "$http_pagesize$"
540 description = "Minim page size required:Maximum page size required"
543 value = "$http_timeout$"
544 description = "Seconds before connection times out"
547 set_if = "$http_ipv4$"
548 description = "Use IPv4 connection"
551 set_if = "$http_ipv6$"
552 description = "Use IPv6 connection"
555 set_if = "$http_link$"
556 description = "Wrap output in HTML link"
559 set_if = "$http_verbose$"
560 description = "Show details for command-line debugging"
564 vars.http_address = "$check_address$"
565 vars.http_ssl = false
566 vars.http_sni = false
567 vars.http_linespan = false
568 vars.http_invertregex = false
569 vars.check_ipv4 = "$http_ipv4$"
570 vars.check_ipv6 = "$http_ipv6$"
571 vars.http_link = false
572 vars.http_verbose = false
575 object CheckCommand "ftp" {
576 import "ipv4-or-ipv6"
578 command = [ PluginDir + "/check_ftp" ]
582 value = "$ftp_address$"
583 description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
587 description = "The FTP port number. Defaults to none"
590 value = "$ftp_expect$"
591 description = "String to expect in server response (may be repeated)."
595 description = "All expect strings need to occur in server response. Default is any."
600 set_if = "$ftp_escape_send$"
601 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
606 description = "String to send to the server."
611 set_if = "$ftp_escape_quit$"
612 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
617 description = "String to send server to initiate a clean close of the connection."
620 value = "$ftp_refuse$"
621 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
624 value = "$ftp_mismatch$"
625 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
628 set_if = "$ftp_jail$"
629 description = "Hide output from TCP socket."
632 value = "$ftp_maxbytes$"
633 description = "Close connection once more than this number of bytes are received."
636 value = "$ftp_delay$"
637 description = "Seconds to wait between sending string and polling for response."
640 value = "$ftp_certificate$"
641 description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
645 description = "Use SSL for the connection."
648 value = "$ftp_wtime$"
649 description = "Response time to result in warning status (seconds)."
652 value = "$ftp_ctime$"
653 description = "Response time to result in critical status (seconds)."
656 value = "$ftp_timeout$"
657 description = "Seconds before connection times out. Defaults to 10."
660 set_if = "$ftp_ipv4$"
661 description = "Use IPv4 connection"
664 set_if = "$ftp_ipv6$"
665 description = "Use IPv6 connection"
669 vars.ftp_address = "$check_address$"
671 vars.ftp_refuse = "crit"
672 vars.ftp_mismatch = "warn"
673 vars.ftp_timeout = 10
674 vars.check_ipv4 = "$ftp_ipv4$"
675 vars.check_ipv6 = "$ftp_ipv6$"
678 object CheckCommand "smtp" {
679 import "ipv4-or-ipv6"
681 command = [ PluginDir + "/check_smtp" ]
685 value = "$smtp_address$"
686 description = "Host name, IP Address, or unix socket (must be an absolute path)"
689 value = "$smtp_port$"
690 description = "Port number (default: 25)"
693 value = "$smtp_mail_from$"
694 description = "FROM-address to include in MAIL command, required by Exchange 2000"
697 value = "$smtp_expect$"
698 description = "String to expect in first line of server response (default: '220')"
701 value = "$smtp_command$"
702 description = "SMTP command"
705 value = "$smtp_response$"
706 description = "Expected response to command (may be used repeatedly)"
709 value = "$smtp_helo_fqdn$"
710 description = "FQDN used for HELO"
713 value = "$smtp_certificate_age$"
714 description = "Minimum number of days a certificate has to be valid"
717 set_if = "$smtp_starttls$"
718 description = "Use STARTTLS for the connection."
721 value = "$smtp_authtype$"
722 description = "SMTP AUTH type to check (default none, only LOGIN supported)"
725 value = "$smtp_authuser$"
726 description = "SMTP AUTH username"
729 value = "$smtp_authpass$"
730 description = "SMTP AUTH password"
733 value = "$smtp_ignore_quit$"
734 description = "Ignore failure when sending QUIT command to server"
737 value = "$smtp_warning$"
738 description = "Response time to result in warning status (seconds)"
741 value = "$smtp_critical$"
742 description = "Response time to result in critical status (seconds)"
745 value = "$smtp_timeout$"
746 description = "Seconds before connection times out (default: 10)"
749 set_if = "$smtp_ipv4$"
750 description = "Use IPv4 connection"
753 set_if = "$smtp_ipv6$"
754 description = "Use IPv6 connection"
758 vars.smtp_address = "$check_address$"
759 vars.check_ipv4 = "$smtp_ipv4$"
760 vars.check_ipv6 = "$smtp_ipv6$"
763 object CheckCommand "ssmtp" {
764 import "ipv4-or-ipv6"
766 command = [ PluginDir + "/check_ssmtp" ]
770 value = "$ssmtp_address$"
771 description = "Host name, IP Address, or unix socket (must be an absolute path)"
774 value = "$ssmtp_port$"
775 description = "Port number (default: none)"
778 value = "$ssmtp_escape$"
779 description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
782 value = "$ssmtp_send$"
783 description = "String to send to the server"
786 value = "$ssmtp_expect$"
787 description = "String to expect in server response (may be repeated)"
790 set_if = "$ssmtp_all$"
791 description = "All expect strings need to occur in server response. Default is any."
794 value = "$ssmtp_quit$"
795 description = "String to send server to initiate a clean close of the connection"
798 value = "$ssmtp_refuse$"
799 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
802 value = "$ssmtp_mismatch$"
803 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
806 set_if = "$ssmtp_jail$"
807 description = "Hide output from TCP socket."
810 value = "$ssmtp_maxbytes$"
811 description = "Close connection once more than this number of bytes are received"
814 value = "$ssmtp_delay$"
815 description = "Seconds to wait between sending string and polling for response"
818 value = "$ssmtp_certificate_age$"
819 description = "Minimum number of days a certificate has to be valid"
822 set_if = "$ssmtp_ssl$"
823 description = "Use SSL for the connection."
826 value = "$ssmtp_warning$"
827 description = "Response time to result in warning status (seconds)"
830 value = "$ssmtp_critical$"
831 description = "Response time to result in critical status (seconds)"
834 value = "$ssmtp_timeout$"
835 description = "Seconds before connection times out (default: 10)"
838 set_if = "$ssmtp_ipv4$"
839 description = "Use IPv4 connection"
842 set_if = "$ssmtp_ipv6$"
843 description = "Use IPv6 connection"
847 vars.ssmtp_address = "$check_address$"
848 vars.check_ipv4 = "$ssmtp_ipv4$"
849 vars.check_ipv6 = "$ssmtp_ipv6$"
852 object CheckCommand "imap" {
853 import "ipv4-or-ipv6"
855 command = [ PluginDir + "/check_imap" ]
859 value = "$imap_address$"
860 description = "Host name, IP Address, or unix socket (must be an absolute path)"
863 value = "$imap_port$"
864 description = "Port number (default: none)"
867 value = "$imap_escape$"
868 description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
871 value = "$imap_send$"
872 description = "String to send to the server"
875 value = "$imap_expect$"
876 description = "String to expect in server response (may be repeated)"
879 set_if = "$imap_all$"
880 description = "All expect strings need to occur in server response. Default is any."
883 value = "$imap_quit$"
884 description = "String to send server to initiate a clean close of the connection"
887 value = "$imap_refuse$"
888 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
891 value = "$imap_mismatch$"
892 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
895 set_if = "$imap_jail$"
896 description = "Hide output from TCP socket."
899 value = "$imap_maxbytes$"
900 description = "Close connection once more than this number of bytes are received"
903 value = "$imap_delay$"
904 description = "Seconds to wait between sending string and polling for response"
907 value = "$imap_certificate_age$"
908 description = "Minimum number of days a certificate has to be valid"
911 set_if = "$imap_ssl$"
912 description = "Use SSL for the connection."
915 value = "$imap_warning$"
916 description = "Response time to result in warning status (seconds)"
919 value = "$imap_critical$"
920 description = "Response time to result in critical status (seconds)"
923 value = "$imap_timeout$"
924 description = "Seconds before connection times out (default: 10)"
927 set_if = "$imap_ipv4$"
928 description = "Use IPv4 connection"
931 set_if = "$imap_ipv6$"
932 description = "Use IPv6 connection"
936 vars.imap_address = "$check_address$"
937 vars.check_ipv4 = "$imap_ipv4$"
938 vars.check_ipv6 = "$imap_ipv6$"
941 object CheckCommand "simap" {
942 import "ipv4-or-ipv6"
944 command = [ PluginDir + "/check_simap" ]
948 value = "$simap_address$"
949 description = "Host name, IP Address, or unix socket (must be an absolute path)"
952 value = "$simap_port$"
953 description = "Port number (default: none)"
956 value = "$simap_escape$"
957 description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
960 value = "$simap_send$"
961 description = "String to send to the server"
964 value = "$simap_expect$"
965 description = "String to expect in server response (may be repeated)"
968 set_if = "$simap_all$"
969 description = "All expect strings need to occur in server response. Default is any."
972 value = "$simap_quit$"
973 description = "String to send server to initiate a clean close of the connection"
976 value = "$simap_refuse$"
977 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
980 value = "$simap_mismatch$"
981 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
984 set_if = "$simap_jail$"
985 description = "Hide output from TCP socket."
988 value = "$simap_maxbytes$"
989 description = "Close connection once more than this number of bytes are received"
992 value = "$simap_delay$"
993 description = "Seconds to wait between sending string and polling for response"
996 value = "$simap_certificate_age$"
997 description = "Minimum number of days a certificate has to be valid"
1000 set_if = "$simap_ssl$"
1001 description = "Use SSL for the connection."
1004 value = "$simap_warning$"
1005 description = "Response time to result in warning status (seconds)"
1008 value = "$simap_critical$"
1009 description = "Response time to result in critical status (seconds)"
1012 value = "$simap_timeout$"
1013 description = "Seconds before connection times out (default: 10)"
1016 set_if = "$simap_ipv4$"
1017 description = "Use IPv4 connection"
1020 set_if = "$simap_ipv6$"
1021 description = "Use IPv6 connection"
1025 vars.simap_address = "$check_address$"
1026 vars.check_ipv4 = "$simap_ipv4$"
1027 vars.check_ipv6 = "$simap_ipv6$"
1030 object CheckCommand "pop" {
1031 import "ipv4-or-ipv6"
1033 command = [ PluginDir + "/check_pop" ]
1037 value = "$pop_address$"
1038 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1041 value = "$pop_port$"
1042 description = "Port number (default: none)"
1045 value = "$pop_escape$"
1046 description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
1049 value = "$pop_send$"
1050 description = "String to send to the server"
1053 value = "$pop_expect$"
1054 description = "String to expect in server response (may be repeated)"
1057 set_if = "$pop_all$"
1058 description = "All expect strings need to occur in server response. Default is any."
1061 value = "$pop_quit$"
1062 description = "String to send server to initiate a clean close of the connection"
1065 value = "$pop_refuse$"
1066 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1069 value = "$pop_mismatch$"
1070 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1073 set_if = "$pop_jail$"
1074 description = "Hide output from TCP socket."
1077 value = "$pop_maxbytes$"
1078 description = "Close connection once more than this number of bytes are received"
1081 value = "$pop_delay$"
1082 description = "Seconds to wait between sending string and polling for response"
1085 value = "$pop_certificate_age$"
1086 description = "Minimum number of days a certificate has to be valid"
1089 set_if = "$pop_ssl$"
1090 description = "Use SSL for the connection."
1093 value = "$pop_warning$"
1094 description = "Response time to result in warning status (seconds)"
1097 value = "$pop_critical$"
1098 description = "Response time to result in critical status (seconds)"
1101 value = "$pop_timeout$"
1102 description = "Seconds before connection times out (default: 10)"
1105 set_if = "$pop_ipv4$"
1106 description = "Use IPv4 connection"
1109 set_if = "$pop_ipv6$"
1110 description = "Use IPv6 connection"
1114 vars.pop_address = "$check_address$"
1115 vars.check_ipv4 = "$pop_ipv4$"
1116 vars.check_ipv6 = "$pop_ipv6$"
1119 object CheckCommand "spop" {
1120 import "ipv4-or-ipv6"
1122 command = [ PluginDir + "/check_spop" ]
1126 value = "$spop_address$"
1127 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1130 value = "$spop_port$"
1131 description = "Port number (default: none)"
1134 value = "$spop_escape$"
1135 description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
1138 value = "$spop_send$"
1139 description = "String to send to the server"
1142 value = "$spop_expect$"
1143 description = "String to expect in server response (may be repeated)"
1146 set_if = "$spop_all$"
1147 description = "All expect strings need to occur in server response. Default is any."
1150 value = "$spop_quit$"
1151 description = "String to send server to initiate a clean close of the connection"
1154 value = "$spop_refuse$"
1155 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1158 value = "$spop_mismatch$"
1159 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1162 set_if = "$spop_jail$"
1163 description = "Hide output from TCP socket."
1166 value = "$spop_maxbytes$"
1167 description = "Close connection once more than this number of bytes are received"
1170 value = "$spop_delay$"
1171 description = "Seconds to wait between sending string and polling for response"
1174 value = "$spop_certificate_age$"
1175 description = "Minimum number of days a certificate has to be valid"
1178 set_if = "$spop_ssl$"
1179 description = "Use SSL for the connection."
1182 value = "$spop_warning$"
1183 description = "Response time to result in warning status (seconds)"
1186 value = "$spop_critical$"
1187 description = "Response time to result in critical status (seconds)"
1190 value = "$spop_timeout$"
1191 description = "Seconds before connection times out (default: 10)"
1194 set_if = "$spop_ipv4$"
1195 description = "Use IPv4 connection"
1198 set_if = "$spop_ipv6$"
1199 description = "Use IPv6 connection"
1203 vars.spop_address = "$check_address$"
1204 vars.check_ipv4 = "$spop_ipv4$"
1205 vars.check_ipv6 = "$spop_ipv6$"
1208 object CheckCommand "ntp_time" {
1209 import "ipv4-or-ipv6"
1211 command = [ PluginDir + "/check_ntp_time" ]
1215 value = "$ntp_address$"
1216 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1219 value = "$ntp_port$"
1220 description = "Port number (default: 123)"
1223 set_if = "$ntp_quiet$"
1224 description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
1227 value = "$ntp_warning$"
1228 description = "Offset to result in warning status (seconds)"
1231 value = "$ntp_critical$"
1232 description = "Offset to result in critical status (seconds)"
1235 value = "$ntp_timeoffset$"
1236 description = "Expected offset of the ntp server relative to local server (seconds)"
1239 value = "$ntp_timeout$"
1240 description = "Seconds before connection times out (default: 10)"
1243 set_if = "$ntp_ipv4$"
1244 description = "Use IPv4 connection"
1247 set_if = "$ntp_ipv6$"
1248 description = "Use IPv6 connection"
1252 vars.ntp_address = "$check_address$"
1253 vars.check_ipv4 = "$ntp_ipv4$"
1254 vars.check_ipv6 = "$ntp_ipv6$"
1257 object CheckCommand "ntp_peer" {
1258 import "ipv4-or-ipv6"
1260 command = [ PluginDir + "/check_ntp_peer" ]
1264 value = "$ntp_address$"
1265 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1268 value = "$ntp_port$"
1269 description = "Port number (default: 123)"
1272 set_if = "$ntp_quiet$"
1273 description = "Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized"
1276 value = "$ntp_warning$"
1277 description = "Offset to result in warning status (seconds)"
1280 value = "$ntp_critical$"
1281 description = "Offset to result in critical status (seconds)"
1284 value = "$ntp_wstratum$"
1285 description = "Warning threshold for stratum of server's synchronization peer"
1288 value = "$ntp_cstratum$"
1289 description = "Critical threshold for stratum of server's synchronization peer"
1292 value = "$ntp_wjitter$"
1293 description = "Warning threshold for jitter"
1296 value = "$ntp_cjitter$"
1297 description = "Critical threshold for jitter"
1300 value = "$ntp_wsource$"
1301 description = "Warning threshold for number of usable time sources (truechimers)"
1304 value = "$ntp_csource$"
1305 description = "Critical threshold for number of usable time sources (truechimers)"
1308 value = "$ntp_timeout$"
1309 description = "Seconds before connection times out (default: 10)"
1312 set_if = "$ntp_ipv4$"
1313 description = "Use IPv4 connection"
1316 set_if = "$ntp_ipv6$"
1317 description = "Use IPv6 connection"
1321 vars.ntp_address = "$check_address$"
1322 vars.check_ipv4 = "$ntp_ipv4$"
1323 vars.check_ipv6 = "$ntp_ipv6$"
1326 object CheckCommand "ssh" {
1327 import "ipv4-or-ipv6"
1329 command = [ PluginDir + "/check_ssh" ]
1333 value = "$ssh_port$"
1334 description = "Port number (default: 22)"
1337 value = "$ssh_timeout$"
1338 description = "Seconds before connection times out (default: 10)"
1341 value = "$ssh_address$"
1346 set_if = "$ssh_ipv4$"
1347 description = "Use IPv4 connection"
1350 set_if = "$ssh_ipv6$"
1351 description = "Use IPv6 connection"
1355 vars.ssh_address = "$check_address$"
1356 vars.check_ipv4 = "$ssh_ipv4$"
1357 vars.check_ipv6 = "$ssh_ipv6$"
1360 object CheckCommand "disk" {
1361 command = [ PluginDir + "/check_disk" ]
1365 value = "$disk_wfree$"
1366 description = "Exit with WARNING status if less than INTEGER units of disk are free or Exit with WARNING status if less than PERCENT of disk space is free"
1371 value = "$disk_cfree$"
1372 description = "Exit with CRITICAL status if less than INTEGER units of disk are free or Exit with CRITCAL status if less than PERCENT of disk space is free"
1377 value = "$disk_inode_wfree$"
1378 description = "Exit with WARNING status if less than PERCENT of inode space is free"
1382 value = "$disk_inode_cfree$"
1383 description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1387 value = "$disk_partitions$"
1388 description = "Path or partition (may be repeated)"
1394 value = "$disk_partition$"
1398 value = "$disk_partitions_excluded$"
1399 description = "Ignore device (only works if -p unspecified)"
1403 value = "$disk_partition_excluded$"
1406 set_if = "$disk_clear$"
1407 description = "Clear thresholds"
1410 set_if = "$disk_exact_match$"
1411 description = "For paths or partitions specified with -p, only check for exact paths"
1414 set_if = "$disk_errors_only$"
1415 description = "Display only devices/mountpoints with errors"
1418 set_if = "$disk_ignore_reserved$"
1419 description = "Don't account root-reserved blocks into freespace in perfdata"
1422 value = "$disk_group$"
1423 description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1426 set_if = "$disk_kilobytes$"
1427 description = "Same as --units kB"
1430 set_if = "$disk_local$"
1431 description = " Only check local filesystems"
1434 set_if = "$disk_stat_remote_fs$"
1435 description = "Only check local filesystems against thresholds. Yet call stat on remote filesystems to test if they are accessible (e.g. to detect Stale NFS Handles)"
1438 set_if = "$disk_mountpoint$"
1439 description = "Display the mountpoint instead of the partition"
1442 set_if = "$disk_megabytes$"
1443 description = "Same as --units MB"
1446 set_if = "$disk_all$"
1447 description = "Explicitly select all paths. This is equivalent to -R .*"
1451 value = "$disk_eregi_path$"
1452 description = "Case insensitive regular expression for path/partition (may be repeated)"
1456 value = "$disk_ereg_path$"
1457 description = "Regular expression for path or partition (may be repeated)"
1461 value = "$disk_ignore_eregi_path$"
1462 description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1467 value = "$disk_ignore_ereg_path$"
1468 description = "Regular expression to ignore selected path or partition (may be repeated)"
1473 value = "$disk_timeout$"
1474 description = "Seconds before connection times out (default: 10)"
1477 value = "$disk_units$"
1478 description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1481 value = "$disk_exclude_type$"
1482 description = "Ignore all filesystems of indicated type (may be repeated)"
1487 vars.disk_wfree = "20%"
1488 vars.disk_cfree = "10%"
1489 vars.disk_megabytes = true
1490 vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "configfs", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ]
1493 object CheckCommand "disk_smb" {
1494 command = [ PluginDir + "/check_disk_smb" ]
1498 value = "$disk_smb_hostname$"
1499 description = "NetBIOS name of the server."
1502 value = "$disk_smb_share$"
1503 description = "Share name to be tested."
1506 value = "$disk_smb_workgroup$"
1507 description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1510 value = "$disk_smb_address$"
1511 description = "IP-address of HOST (only necessary if HOST is in another network)."
1514 value = "$disk_smb_username$"
1515 description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1518 value = "$disk_smb_password$"
1519 description = "Password to log in to server. (Defaults to an empty password if omitted)."
1522 value = "$disk_smb_wused$"
1523 description = "Percent of used space at which a warning will be generated (Default: 85%)."
1526 value = "$disk_smb_cused$"
1527 description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1530 value = "$disk_smb_port$"
1531 description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1535 vars.disk_smb_wused = "85%"
1536 vars.disk_smb_cused = "95%"
1539 object CheckCommand "users" {
1540 command = [ PluginDir + "/check_users" ]
1544 value = "$users_wgreater$"
1545 description = "Set WARNING status if more than INTEGER users are logged in"
1548 value = "$users_cgreater$"
1549 description = "Set CRITICAL status if more than INTEGER users are logged in"
1553 vars.users_wgreater = 20
1554 vars.users_cgreater = 50
1557 object CheckCommand "procs" {
1558 command = [ PluginDir + "/check_procs" ]
1562 value = "$procs_warning$"
1563 description = "Generate warning state if metric is outside this range"
1566 value = "$procs_critical$"
1567 description = "Generate critical state if metric is outside this range"
1570 value = "$procs_metric$"
1571 description = "Check thresholds against metric"
1574 value = "$procs_timeout$"
1575 description = "Seconds before plugin times out"
1578 set_if = "$procs_traditional$"
1579 description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1582 value = "$procs_state$"
1583 description = "Only scan for processes that have one or more of the status flags you specify"
1586 value = "$procs_ppid$"
1587 description = "Only scan for children of the parent process ID indicated"
1590 value = "$procs_vsz$"
1591 description = "Only scan for processes with VSZ higher than indicated"
1594 value = "$procs_rss$"
1595 description = "Only scan for processes with RSS higher than indicated"
1598 value = "$procs_pcpu$"
1599 description = "Only scan for processes with PCPU higher than indicated"
1602 value = "$procs_user$"
1603 description = "Only scan for processes with user name or ID indicated"
1606 value = "$procs_argument$"
1607 description = "Only scan for processes with args that contain STRING"
1609 "--ereg-argument-array" = {
1610 value = "$procs_argument_regex$"
1611 description = "Only scan for processes with args that contain the regex STRING"
1614 value = "$procs_command$"
1615 description = "Only scan for exact matches of COMMAND (without path)"
1618 set_if = "$procs_nokthreads$"
1619 description = "Only scan for non kernel threads"
1623 vars.procs_traditional = false
1624 vars.procs_nokthreads = false
1625 vars.procs_warning = 250
1626 vars.procs_critical = 400
1629 object CheckCommand "swap" {
1630 command = [ PluginDir + "/check_swap" ]
1634 if (macro("$swap_integer$")) {
1635 return macro("$swap_wfree$")
1637 return macro("$swap_wfree$%")
1641 if (macro("$swap_integer$")) {
1642 return macro("$swap_cfree$")
1644 return macro("$swap_cfree$%")
1648 set_if = "$swap_allswaps$"
1649 description = "Conduct comparisons for all swap partitions, one by one"
1652 value = "$swap_noswap$"
1653 description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1657 vars.swap_wfree = 50
1658 vars.swap_cfree = 25
1659 vars.swap_integer = false
1660 vars.swap_allswaps = false
1663 object CheckCommand "load" {
1664 command = [ PluginDir + "/check_load" ]
1668 value = "$load_wload1$,$load_wload5$,$load_wload15$"
1669 description = "Exit with WARNING status if load average exceeds WLOADn"
1672 value = "$load_cload1$,$load_cload5$,$load_cload15$"
1673 description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1676 set_if = "$load_percpu$"
1677 description = "Divide the load averages by the number of CPUs (when possible)"
1681 vars.load_wload1 = 5.0
1682 vars.load_wload5 = 4.0
1683 vars.load_wload15 = 3.0
1685 vars.load_cload1 = 10.0
1686 vars.load_cload5 = 6.0
1687 vars.load_cload15 = 4.0
1689 vars.load_percpu = false
1692 object CheckCommand "snmp" {
1693 command = [ PluginDir + "/check_snmp" ]
1697 value = "$snmp_address$"
1698 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1701 value = "$snmp_oid$"
1702 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1705 value = "$snmp_community$"
1706 description = "Optional community string for SNMP communication (default is 'public')"
1709 value = "$snmp_crit$"
1710 description = "Critical threshold range(s)"
1713 value = "$snmp_warn$"
1714 description = "Warning threshold range(s)"
1717 value = "$snmp_string$"
1718 description = "Return OK state (for that OID) if STRING is an exact match"
1721 value = "$snmp_ereg$"
1722 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1725 value = "$snmp_eregi$"
1726 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1729 value = "$snmp_label$"
1730 description = "Prefix label for output from plugin"
1733 value = "$snmp_units$"
1734 description = "Units label(s) for output data (e.g., 'sec.')"
1737 value = "$snmp_timeout$"
1738 description = "Seconds before connection times out (default: 10)"
1741 value = "$snmp_port$"
1742 description = "Port number (default: 161)"
1745 value = "$snmp_retries$"
1746 description = "Number of retries to be used in the requests"
1748 "--invert-search" = {
1749 set_if = "$snmp_invert_search$"
1750 description = "Invert search result and return CRITICAL if found"
1753 value = "$snmp_version$"
1754 description = "SNMP protocol version"
1757 value = "$snmp_miblist$"
1758 description = "List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL' for symbolic OIDs.)"
1760 "--rate-multiplier" = {
1761 value = "$snmp_rate_multiplier$"
1762 description = "Converts rate per second. For example, set to 60 to convert to per minute"
1765 set_if = "$snmp_rate$"
1766 description = "Enable rate calculation"
1769 set_if = "$snmp_getnext$"
1770 description = "Use SNMP GETNEXT instead of SNMP GET"
1773 value = "$snmp_offset$"
1774 description = "Add/substract the specified OFFSET to numeric sensor data"
1777 value = "$snmp_output_delimiter$"
1778 description = "Separates output on multiple OID requests"
1781 set_if = "$snmp_perf_oids$"
1782 description = "Label performance data with OIDs instead of --label's"
1786 vars.snmp_address = {{
1787 var addr_v4 = macro("$address$")
1788 var addr_v6 = macro("$address6$")
1793 return "udp6:[" + addr_v6 + "]"
1797 vars.snmp_community = "public"
1798 vars.snmp_invert_search = false
1799 vars.snmp_timeout = "10"
1802 object CheckCommand "snmpv3" {
1803 import "ipv4-or-ipv6"
1805 command = [ PluginDir + "/check_snmp" ]
1809 value = "$snmpv3_address$"
1810 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1813 value = "$snmpv3_port$"
1814 description = "Port number"
1817 set_if = "$snmpv3_getnext$"
1818 description = "Use SNMP GETNEXT instead of SNMP GET"
1822 description = "SNMP protocol version"
1825 value = "$snmpv3_seclevel$"
1826 description = "SNMPv3 securityLevel"
1829 value = "$snmpv3_auth_alg$"
1830 description = "SNMPv3 auth proto"
1833 value = "$snmpv3_user$"
1834 description = "SNMPv3 username"
1837 value = "$snmpv3_auth_key$"
1838 description = "SNMPv3 authentication password"
1841 value = "$snmpv3_priv_key$"
1842 description = "SNMPv3 privacy password"
1845 value = "$snmpv3_oid$"
1846 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1849 value = "$snmpv3_priv_alg$"
1850 description = "SNMPv3 priv proto (default DES)"
1853 value = "$snmpv3_warn$"
1854 description = "Warning threshold range(s)"
1857 value = "$snmpv3_crit$"
1858 description = "Critical threshold range(s)"
1861 value = "$snmpv3_string$"
1862 description = "Return OK state (for that OID) if STRING is an exact match"
1865 value = "$snmpv3_ereg$"
1866 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1869 value = "$snmpv3_eregi$"
1870 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1872 "--invert-search" = {
1873 set_if = "$snmpv3_invert_search$"
1874 description = "Invert search result and return CRITICAL if found"
1877 value = "$snmpv3_label$"
1878 description = "Prefix label for output from plugin"
1881 value = "$snmpv3_miblist$"
1882 description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1885 value = "$snmpv3_units$"
1886 description = "Units label(s) for output data (e.g., 'sec.')"
1888 "--rate-multiplier" = {
1889 value = "$snmpv3_rate_multiplier$"
1890 description = "Converts rate per second. For example, set to 60 to convert to per minute"
1893 set_if = "$snmpv3_rate$"
1894 description = "Enable rate calculation"
1897 value = "$snmpv3_timeout$"
1898 description = "Seconds before connection times out (default: 10)"
1902 vars.snmpv3_address = "$check_address$"
1903 vars.snmpv3_auth_alg = "SHA"
1904 vars.snmpv3_priv_alg = "AES"
1905 vars.snmpv3_seclevel = "authPriv"
1906 vars.snmpv3_timeout = "10"
1909 object CheckCommand "snmp-uptime" {
1912 vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1915 object CheckCommand "apt" {
1916 command = [ PluginDir + "/check_apt" ]
1920 value = "$apt_extra_opts$"
1921 description = "Read options from an ini file."
1924 value = "$apt_upgrade$"
1925 description = "[Default] Perform an upgrade. If an optional OPTS argument is provided, apt-get will be run with these command line options instead of the default."
1927 "--dist-upgrade" = {
1928 value = "$apt_dist_upgrade$"
1929 description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1932 value = "$apt_include$"
1933 description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1936 value = "$apt_exclude$"
1937 description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1940 value = "$apt_critical$"
1941 description = "If the full package information of any of the upgradable packages match this REGEXP, the plugin will return CRITICAL status. Can be specified multiple times."
1944 value = "$apt_timeout$"
1945 description = "Seconds before plugin times out (default: 10)."
1947 "--only-critical" = {
1948 set_if = "$apt_only_critical$"
1949 description = "Only warn about critical upgrades."
1956 object CheckCommand "dhcp" {
1957 command = [ PluginDir + "/check_dhcp" ]
1961 value = "$dhcp_serverip$"
1962 description = "IP address of DHCP server that we must hear from"
1965 value = "$dhcp_requestedip$"
1966 description = "IP address that should be offered by at least one DHCP server"
1969 value = "$dhcp_timeout$"
1970 description = "Seconds to wait for DHCPOFFER before timeout occurs"
1973 value = "$dhcp_interface$"
1974 description = "Interface to to use for listening (i.e. eth0)"
1977 value = "$dhcp_mac$"
1978 description = "MAC address to use in the DHCP request"
1981 set_if = "$dhcp_unicast$"
1982 description = "Unicast testing: mimic a DHCP relay"
1986 vars.dhcp_unicast = false
1989 object CheckCommand "dns" {
1990 import "ipv4-or-ipv6"
1992 command = [ PluginDir + "/check_dns" ]
1996 value = "$dns_lookup$"
1997 description = "The name or address you want to query."
2000 value = "$dns_server$"
2001 description = "Optional DNS server you want to use for the lookup."
2004 value = "$dns_query_type$"
2005 description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
2008 value = "$dns_expected_answers$"
2009 description = "Optional ip address or host you expect the DNS server to return. Host must end with a dot (.). This option can be repeated multiple times (Returns OK if any value match). If multiple addresses are returned at once, you have to match the whole string of addresses separated with commas (sorted alphabetically)."
2012 set_if = "$dns_authoritative$"
2013 description = "Optionally expect the DNS server to be authoritative for the lookup"
2016 set_if = "$dns_accept_cname$"
2017 description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
2020 value = "$dns_wtime$"
2021 description = "Return warning if elapsed time exceeds value."
2024 value = "$dns_ctime$"
2025 description = "Return critical if elapsed time exceeds value."
2028 value = "$dns_timeout$"
2029 description = "Seconds before connection times out. Defaults to 10."
2033 vars.dns_lookup = "$host.name$"
2034 vars.dns_timeout = 10
2037 object CheckCommand "dig" {
2038 import "ipv4-or-ipv6"
2040 command = [ PluginDir + "/check_dig" ]
2044 value = "$dig_server$"
2045 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2048 value = "$dig_port$"
2049 description = "Port number (default: 53)"
2052 value = "$dig_lookup$"
2054 description = "Machine name to lookup"
2057 value = "$dig_record_type$"
2058 description = "Record type to lookup (default: A)"
2061 value = "$dig_expected_address$"
2062 description = "An address expected to be in the answer section"
2065 value = "$dig_arguments$"
2066 description = "Pass STRING as argument(s) to dig"
2069 value = "$dig_warning$"
2070 description = "Response time to result in warning status (seconds)"
2073 value = "$dig_critical$"
2074 description = "Response time to result in critical status (seconds)"
2077 value = "$dig_timeout$"
2078 description = "Seconds before connection times out (default: 10)"
2081 set_if = "$dig_ipv4$"
2082 description = "Force dig to only use IPv4 query transport"
2085 set_if = "$dig_ipv6$"
2086 description = "Force dig to only use IPv6 query transport"
2090 vars.dig_server = "$check_address$"
2091 vars.check_ipv4 = "$dig_ipv4$"
2092 vars.check_ipv6 = "$dig_ipv6$"
2095 object CheckCommand "nscp" {
2096 import "ipv4-or-ipv6"
2098 command = [ PluginDir + "/check_nt" ]
2102 value = "$nscp_address$"
2103 description = "Name of the host to check"
2106 value = "$nscp_port$"
2107 description = "Optional port number (default: 1248)"
2110 value = "$nscp_password$"
2111 description = "Password needed for the request"
2114 value = "$nscp_variable$"
2116 description = "Variable to check"
2119 value = "$nscp_params$"
2123 value = "$nscp_warn$"
2124 description = "Threshold which will result in a warning status"
2127 value = "$nscp_crit$"
2128 description = "Threshold which will result in a critical status"
2131 value = "$nscp_timeout$"
2132 description = "Seconds before connection attempt times out"
2136 set_if = "$nscp_showall$"
2137 description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
2141 vars.nscp_address = "$check_address$"
2142 vars.nscp_port = 12489
2143 vars.nscp_showall = false
2146 object CheckCommand "by_ssh" {
2147 import "ipv4-or-ipv6"
2149 command = [ PluginDir + "/check_by_ssh" ]
2153 value = "$by_ssh_address$"
2154 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2157 value = "$by_ssh_port$"
2158 description = "Port number (default: none)"
2161 var command = macro("$by_ssh_command$")
2162 var arguments = macro("$by_ssh_arguments$")
2164 if (typeof(command) == String && !arguments) {
2168 var escaped_args = []
2169 for (arg in resolve_arguments(command, arguments)) {
2170 escaped_args.add(escape_shell_arg(arg))
2172 return escaped_args.join(" ")
2175 value = "$by_ssh_logname$"
2176 description = "SSH user name on remote host [optional]"
2179 value = "$by_ssh_identity$"
2180 description = "identity of an authorized key [optional]"
2183 set_if = "$by_ssh_quiet$"
2184 description = "Tell ssh to suppress warning and diagnostic messages [optional]"
2187 value = "$by_ssh_warn$"
2188 description = "Response time to result in warning status (seconds)"
2191 value = "$by_ssh_crit$"
2192 description = "Response time to result in critical status (seconds)"
2195 value = "$by_ssh_timeout$"
2196 description = "Seconds before connection times out (default: 10)"
2199 value = "$by_ssh_options$"
2200 description = "Provide ssh options (may be repeated)"
2203 set_if = "$by_ssh_ipv4$"
2204 description = "Use IPv4 only"
2207 set_if = "$by_ssh_ipv6$"
2208 description = "Use IPv6 only"
2212 vars.by_ssh_address = "$check_address$"
2213 vars.by_ssh_quiet = false
2214 vars.check_ipv4 = "$by_ssh_ipv4$"
2215 vars.check_ipv6 = "$by_ssh_ipv6$"
2218 object CheckCommand "ups" {
2219 import "ipv4-or-ipv6"
2221 command = [ PluginDir + "/check_ups" ]
2225 value = "$ups_address$"
2226 description = "Address of the upsd server"
2230 value = "$ups_name$"
2231 description = "Name of the UPS to monitor"
2235 value = "$ups_port$"
2236 description = "Port number (default: 3493)"
2239 value = "$ups_variable$"
2240 description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
2243 value = "$ups_warning$"
2244 description = "Warning threshold for the selected variable"
2247 value = "$ups_critical$"
2248 description = "Critical threshold for the selected variable"
2251 set_if = "$ups_celsius$"
2252 description = "Display temperature in degrees Celsius instead of Fahrenheit"
2255 value = "$ups_timeout$"
2256 description = "Seconds before the connection times out (default: 10)"
2260 vars.ups_address = "$check_address$"
2261 vars.ups_name = "ups"
2264 object CheckCommand "nrpe" {
2265 import "ipv4-or-ipv6"
2267 command = [ PluginDir + "/check_nrpe" ]
2271 value = "$nrpe_address$"
2272 description = "The address of the host running the NRPE daemon"
2275 value = "$nrpe_port$"
2278 value = "$nrpe_command$"
2281 set_if = "$nrpe_no_ssl$"
2282 description = "Do not use SSL"
2285 set_if = "$nrpe_timeout_unknown$"
2286 description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
2289 value = "$nrpe_timeout$"
2290 description = "<interval>:<state> = <Number of seconds before connection times out>:<Check state to exit with in the event of a timeout (default=CRITICAL)>"
2293 value = "$nrpe_arguments$"
2298 set_if = "$nrpe_ipv4$"
2299 description = "Use IPv4 connection"
2302 set_if = "$nrpe_ipv6$"
2303 description = "Use IPv6 connection"
2306 set_if = "$nrpe_version_2$"
2307 description = "Use this if you want to connect to NRPE v2"
2311 vars.nrpe_address = "$check_address$"
2312 vars.nrpe_no_ssl = false
2313 vars.nrpe_timeout_unknown = false
2314 vars.check_ipv4 = "$nrpe_ipv4$"
2315 vars.check_ipv6 = "$nrpe_ipv6$"
2316 vars.nrpe_version_2 = false
2320 object CheckCommand "hpjd" {
2321 import "ipv4-or-ipv6"
2323 command = [ PluginDir + "/check_hpjd" ]
2327 value = "$hpjd_address$"
2328 description = "Host address"
2331 value = "$hpjd_community$"
2332 description = "The SNMP community name (default=public)"
2335 value = "$hpjd_port$"
2336 description = "Specify the port to check (default=161)"
2340 vars.hpjd_address = "$check_address$"
2343 object CheckCommand "icmp" {
2344 command = [ PluginDir + "/check_icmp" ]
2348 value = "$icmp_address$"
2351 description = "Host address"
2354 value = "$icmp_wrta$,$icmp_wpl$%"
2355 description = "warning threshold (currently 200.000ms,40%)"
2358 value = "$icmp_crta$,$icmp_cpl$%"
2359 description = "critical threshold (currently 500.000ms,80%)"
2362 value = "$icmp_source$"
2363 description = "specify a source IP address or device name"
2366 value = "$icmp_packets$"
2367 description = "number of packets to send (currently 5)"
2370 value = "$icmp_packet_interval$"
2371 description = "max packet interval (currently 80.000ms)"
2374 value = "$icmp_target_interval$"
2375 description = "max target interval (currently 0.000ms)"
2378 value = "$icmp_hosts_alive$"
2379 description = "number of alive hosts required for success"
2382 value = "$icmp_data_bytes$"
2383 description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
2386 value = "$icmp_timeout$"
2387 description = "timeout value (seconds, currently 10)"
2390 value = "$icmp_ttl$"
2391 description = "TTL on outgoing packets (currently 0)"
2395 vars.icmp_address = "$address$"
2396 vars.icmp_wrta = 100
2398 vars.icmp_crta = 200
2402 object CheckCommand "ldap" {
2403 import "ipv4-or-ipv6"
2405 command = [ PluginDir + "/check_ldap" ]
2409 value = "$ldap_address$"
2410 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2413 value = "$ldap_port$"
2414 description = "Port number (default: 389)"
2417 value = "$ldap_attr$"
2418 description = "ldap attribute to search (default: \"(objectclass=*)\""
2421 value = "$ldap_base$"
2423 description = "ldap base (eg. ou=my unit, o=my org, c=at"
2426 value = "$ldap_bind$"
2427 description = "ldap bind DN (if required)"
2430 value = "$ldap_pass$"
2431 description = "ldap password (if required)"
2434 set_if = "$ldap_starttls$"
2435 description = "use starttls mechanism introduced in protocol version 3"
2438 set_if = "$ldap_ssl$"
2439 description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
2442 set_if = "$ldap_v2$"
2443 description = "Use LDAP protocol version 2"
2446 set_if = "$ldap_v3$"
2447 description = "Use LDAP protocol version 3"
2450 value = "$ldap_warning$"
2451 description = "Response time to result in warning status (seconds)"
2454 value = "$ldap_critical$"
2455 description = "Response time to result in critical status (seconds)"
2458 value = "$ldap_warning_entries$"
2459 description = "Number of found entries to result in warning status (optional)"
2462 value = "$ldap_critical_entries$"
2463 description = "Number of found entries to result in critical status (optional)"
2466 value = "$ldap_timeout$"
2467 description = "Seconds before connection times out (default: 10)"
2470 set_if = "$ldap_verbose$"
2471 description = "Show details for command-line debugging"
2475 vars.ldap_address = "$check_address$"
2477 vars.ldap_v3 = false
2478 vars.ldap_timeout = 10s
2479 vars.ldap_verbose = false
2482 object CheckCommand "clamd" {
2483 command = [ PluginDir + "/check_clamd" ]
2487 value = "$clamd_address$"
2488 description = "The host's address or unix socket (must be an absolute path)."
2492 value = "$clamd_port$"
2493 description = "Port number (default: none)."
2496 value = "$clamd_expect$"
2497 description = "String to expect in server response (may be repeated)."
2501 set_if = "$clamd_all$"
2502 description = "All expect strings need to occur in server response. Default is any."
2507 set_if = "$clamd_escape_send$"
2508 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
2512 value = "$clamd_send$"
2513 description = "String to send to the server."
2518 set_if = "$clamd_escape_quit$"
2519 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
2523 value = "$clamd_quit$"
2524 description = "String to send server to initiate a clean close of the connection."
2527 value = "$clamd_refuse$"
2528 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
2531 value = "$clamd_mismatch$"
2532 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
2535 set_if = "$clamd_jail$"
2536 description = "Hide output from TCP socket."
2539 value = "$clamd_maxbytes$"
2540 description = "Close connection once more than this number of bytes are received."
2543 value = "$clamd_delay$"
2544 description = "Seconds to wait between sending string and polling for response."
2547 value = "$clamd_certificate$"
2548 description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
2551 set_if = "$clamd_ssl$"
2552 description = "Use SSL for the connection."
2555 value = "$clamd_wtime$"
2556 description = "Response time to result in warning status (seconds)."
2559 value = "$clamd_ctime$"
2560 description = "Response time to result in critical status (seconds)."
2563 value = "$clamd_timeout$"
2564 description = "Seconds before connection times out. Defaults to 10."
2567 set_if = "$clamd_ipv4$"
2568 description = "Use IPv4 only"
2571 set_if = "$clamd_ipv6$"
2572 description = "Use IPv6 only"
2576 vars.clamd_ssl = false
2577 vars.clamd_refuse = "crit"
2578 vars.clamd_mismatch = "warn"
2579 vars.clamd_timeout = 10
2580 vars.check_ipv4 = "$clamd_ipv4$"
2581 vars.check_ipv6 = "$clamd_ipv6$"
2584 object CheckCommand "mailq" {
2585 command = [ PluginDir + "/check_mailq" ]
2589 value = "$mailq_warning$"
2590 description = "Min. number of messages in queue to generate warning"
2594 value = "$mailq_critical$"
2595 description = "Min. number of messages in queue to generate critical alert ( w < c )"
2599 value = "$mailq_domain_warning$"
2600 description = "Min. number of messages for same domain in queue to generate warning"
2603 value = "$mailq_domain_critical$"
2604 description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2607 value = "$mailq_timeout$"
2608 description = "Plugin timeout in seconds (default = 15)"
2611 value = "$mailq_servertype$"
2612 description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2615 set_if = "$mailq_sudo$"
2616 description = "Use sudo for mailq command"
2621 object CheckCommand "pgsql" {
2622 import "ipv4-or-ipv6"
2624 command = [ PluginDir + "/check_pgsql" ]
2628 value = "$pgsql_hostname$"
2629 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2632 value = "$pgsql_port$"
2633 description = "Port number (default: 5432)"
2636 value = "$pgsql_database$"
2637 description = "Database to check (default: template1)"
2640 value = "$pgsql_username$"
2641 description = "Login name of user"
2644 value = "$pgsql_password$"
2645 description = "Password (BIG SECURITY ISSUE)"
2648 value = "$pgsql_options$"
2649 description = "Connection parameters (keyword = value), see below"
2652 value = "$pgsql_warning$"
2653 description = "Response time to result in warning status (seconds)"
2656 value = "$pgsql_critical$"
2657 description = "Response time to result in critical status (seconds)"
2660 value = "$pgsql_timeout$"
2661 description = "Seconds before connection times out (default: 10)"
2664 value = "$pgsql_query$"
2665 description = "SQL query to run. Only first column in first row will be read"
2668 value = "$pgsql_query_warning$"
2669 description = "SQL query value to result in warning status (double)"
2672 value = "$pgsql_query_critical$"
2673 description = "SQL query value to result in critical status (double)"
2677 vars.pgsql_hostname = "$check_address$"
2680 object CheckCommand "mysql" {
2681 import "ipv4-or-ipv6"
2683 command = [ PluginDir + "/check_mysql" ]
2687 value = "$mysql_hostname$"
2688 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2691 value = "$mysql_port$"
2692 description = "Port number (default: 3306)"
2695 set_if = "$mysql_ignore_auth$"
2696 description = "Ignore authentication failure and check for mysql connectivity only"
2699 value = "$mysql_socket$"
2700 description = "Use the specified socket"
2703 value = "$mysql_database$"
2704 description = "Check database with indicated name"
2707 value = "$mysql_file$"
2708 description = "Read from the specified client options file"
2711 value = "$mysql_group$"
2712 description = "Use a client options group"
2715 value = "$mysql_username$"
2716 description = "Connect using the indicated username"
2719 value = "$mysql_password$"
2720 description = "Use the indicated password to authenticate the connection"
2723 set_if = "$mysql_check_slave$"
2724 description = "Check if the slave thread is running properly"
2727 value = "$mysql_warning$"
2728 description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
2731 value = "$mysql_critical$"
2732 description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
2735 set_if = "$mysql_ssl$"
2736 description = "Use ssl encryptation"
2739 value = "$mysql_cacert$"
2740 description = "Path to CA signing the cert"
2743 value = "$mysql_cert$"
2744 description = "Path to SSL certificate"
2747 value = "$mysql_key$"
2748 description = "Path to private SSL key"
2751 value = "$mysql_cadir$"
2752 description = "Path to CA directory"
2755 value = "$mysql_ciphers$"
2756 description = "List of valid SSL ciphers"
2760 vars.mysql_hostname = "$check_address$"
2763 object CheckCommand "negate" {
2764 command = [ PluginDir + "/negate" ]
2768 value = "$negate_timeout$"
2769 description = "Seconds before plugin times out (default: 11)"
2772 value = "$negate_timeout_result$"
2773 description = "Custom result on Negate timeouts"
2776 value = "$negate_ok$"
2779 value = "$negate_warning$"
2782 value = "$negate_critical$"
2785 value = "$negate_unknown$"
2788 set_if = "$negate_substitute$"
2789 description = "Substitute output text as well. Will only substitute text in CAPITALS"
2791 "--wrapped-plugin" = {
2793 var command = macro("$negate_command$")
2794 var arguments = macro("$negate_arguments$")
2796 if (typeof(command) == String && !arguments) {
2800 var escaped_args = []
2801 for (arg in resolve_arguments(command, arguments)) {
2802 escaped_args.add(arg)
2804 return escaped_args.join(" ")
2811 vars.negate_timeout_result = "UNKNOWN"
2814 object CheckCommand "file_age" {
2815 command = [ PluginDir + "/check_file_age" ]
2819 value = "$file_age_warning_time$"
2820 description = "File must be no more than this many seconds old (default: 240s)"
2823 value = "$file_age_critical_time$"
2824 description = "File must be no more than this many seconds old (default: 600s)"
2827 value = "$file_age_warning_size$"
2828 description = "File must be at least this many bytes long"
2831 value = "$file_age_critical_size$"
2832 description = "File must be at least this many bytes long (default: 0B)"
2835 set_if = "$file_age_ignoremissing$"
2836 description = "return OK if the file does not exist"
2839 value = "$file_age_file$"
2840 description = "File to monitor"
2844 vars.file_age_ignoremissing = false
2847 object CheckCommand "smart" {
2848 command = [ PluginDir + "/check_ide_smart" ]
2852 value = "$smart_device$"
2853 description = "Name of a local hard drive to monitor"
2859 object CheckCommand "breeze" {
2860 import "ipv4-or-ipv6"
2862 command = [ PluginDir + "/check_breeze" ]
2866 value = "$breeze_hostname$"
2867 description = "Name or IP address of host to check"
2871 value = "$breeze_community$"
2872 description = "SNMPv1 community (default public)"
2875 value = "$breeze_warning$"
2876 description = "Percentage strength below which a WARNING status will result"
2880 value = "$breeze_critical$"
2881 description = "Percentage strength below which a CRITICAL status will result"
2886 vars.breeze_hostname = "$check_address$"
2887 vars.breeze_warning = "50"
2888 vars.breeze_critical = "20"
2891 object CheckCommand "flexlm" {
2892 command = [ PluginDir + "/check_flexlm" ]
2896 value = "$flexlm_licensefile$"
2897 description = "Name of license file (usually license.dat)"
2901 value = "$flexlm_timeout$"
2902 description = "Plugin time out in seconds (default = 15)"
2907 object CheckCommand "game" {
2908 import "ipv4-or-ipv6"
2910 command = [ PluginDir + "/check_game" ]
2914 value = "$game_port$"
2915 description = "Port to connect to"
2918 value = "$game_timeout$"
2919 description = "Seconds before connection times out (default: 10)"
2922 value = "$game_gamefield$"
2923 description = "Field number in raw qstat output that contains game name"
2926 value = "$game_mapfield$"
2927 description = "Field number in raw qstat output that contains map name"
2930 value = "$game_pingfield$"
2931 description = "Field number in raw qstat output that contains ping time"
2934 value = "$game_gametime$"
2935 description = "Field number in raw qstat output that contains game time"
2938 value = "$game_hostname$"
2939 description = "Name of the host running the game"
2942 value = "$game_game$"
2943 description = "Name of the game"
2948 value = "$game_ipaddress$"
2949 description = "Ipaddress of the game server to query"
2956 object CheckCommand "mysql_query" {
2957 import "ipv4-or-ipv6"
2959 command = [ PluginDir + "/check_mysql_query" ]
2963 value = "$mysql_query_hostname$"
2964 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2967 value = "$mysql_query_port$"
2968 description = "Port number (default: 3306)"
2971 value = "$mysql_query_username$"
2972 description = "Username to login with"
2975 value = "$mysql_query_password$"
2976 description = "Password to login with"
2979 value = "$mysql_query_database$"
2980 description = "Database to check"
2983 value = "$mysql_query_file$"
2984 description = "Read from the specified client options file"
2987 value = "$mysql_query_group$"
2988 description = "Use a client options group"
2991 value = "$mysql_query_execute$"
2992 description = "SQL query to run. Only first column in first row will be read"
2995 value = "$mysql_query_warning$"
2996 description = "Warning range (format: start:end). Alert if outside this range"
2999 value = "$mysql_query_critical$"
3000 description = "Critical range"
3004 vars.mysql_query_hostname = "$check_address$"
3007 object CheckCommand "radius" {
3008 import "ipv4-or-ipv6"
3011 PluginDir + "/check_radius",
3016 value = "$radius_address$",
3017 description = "Host name, IP Address, or unix socket (must be an absolute path)"
3020 value = "$radius_config_file$",
3021 description = "Configuration file"
3024 value = "$radius_username$",
3025 description = "The user to authenticate"
3028 value = "$radius_password$",
3029 description = "Password for authentication"
3032 value = "$radius_port$",
3033 description = "Port number (default: 1645)"
3036 value = "$radius_nas_id$",
3037 description = "NAS identifier"
3040 value = "$radius_nas_address$",
3041 description = "NAS IP Address"
3044 value = "$radius_expect$",
3045 description = "Response string to expect from the server"
3048 value = "$radius_retries$",
3049 description = "Number of times to retry a failed connection"
3052 value = "$radius_timeout$",
3053 description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
3057 vars.radius_address = "$check_address$"
3060 object CheckCommand "nscp_api" {
3061 import "ipv4-or-ipv6"
3063 command = [ PluginDir + "/check_nscp_api" ]
3067 value = "$nscp_api_host$"
3068 description = "NSCP API host address"
3072 value = "$nscp_api_port$"
3073 description = "NSCP API host port. Defaults to 8443."
3076 value = "$nscp_api_password$"
3077 description = "NSCP API password"
3080 value = "$nscp_api_query$"
3081 description = "NSCPI API Query endpoint to use"
3084 value = "$nscp_api_arguments$"
3085 description = "NSCP API Query arguments"
3090 vars.nscp_api_host = "$check_address$"
3093 object CheckCommand "rpc" {
3094 import "ipv4-or-ipv6"
3096 command = [ PluginDir + "/check_rpc" ]
3100 value = "$rpc_address$"
3101 description = "RPC host address"
3105 value = "$rpc_command$"
3106 description = "Programm name (or number)"
3110 value = "$rpc_port$"
3111 description = "RPC port"
3114 value = "$rpc_version$"
3115 description = "The version to check"
3118 set_if = "$rpc_udp$"
3119 description = "Test UDP"
3122 set_if = "$rpc_tcp$"
3123 description = "Test TCP"
3126 set_if = "$rpc_verbose$"
3127 description = "Show verbose details"
3131 vars.rpc_address = "$check_address$"