1 /******************************************************************************
3 * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License *
7 * as published by the Free Software Foundation; either version 2 *
8 * of the License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software Foundation *
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ******************************************************************************/
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 "dummy" {
180 command = [ PluginDir + "/check_dummy" ]
184 value = "$dummy_state$"
187 description = "The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0."
190 value = "$dummy_text$"
193 description = "Plugin output. Defaults to Check was successful."
198 vars.dummy_text = "Check was successful."
201 object CheckCommand "passive" {
205 vars.dummy_text = "No Passive Check Result Received."
208 object CheckCommand "tcp" {
209 import "ipv4-or-ipv6"
211 command = [ PluginDir + "/check_tcp" ]
215 value = "$tcp_address$"
216 description = "Host name, IP Address, or unix socket (must be an absolute path)."
220 description = "The TCP port number."
223 value = "$tcp_expect$"
224 description = "String to expect in server response (may be repeated)."
228 description = "All expect strings need to occur in server response. Defaults to false."
233 set_if = "$tcp_escape_send$"
234 description = "Enable usage of \n, \r, \t or \\ in send string."
239 description = "String to send to the server."
244 set_if = "$tcp_escape_quit$"
245 description = "Enable usage of \n, \r, \t or \\ in quit string."
250 description = "String to send server to initiate a clean close of the connection."
253 value = "$tcp_refuse$"
254 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
257 value = "$tcp_mismatch$"
258 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
261 set_if = "$tcp_jail$"
262 description = "Hide output from TCP socket."
265 value = "$tcp_maxbytes$"
266 description = "Close connection once more than this number of bytes are received."
269 value = "$tcp_delay$"
270 description = "Seconds to wait between sending string and polling for response."
273 value = "$tcp_certificate$"
274 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."
278 description = "Use SSL for the connection."
281 value = "$tcp_wtime$"
282 description = "Response time to result in warning status (seconds)."
285 value = "$tcp_ctime$"
286 description = "Response time to result in critical status (seconds)."
289 value = "$tcp_timeout$"
290 description = "Seconds before connection times out. Defaults to 10."
293 set_if = "$tcp_ipv4$"
294 description = "Use IPv4 connection"
297 set_if = "$tcp_ipv6$"
298 description = "Use IPv6 connection"
302 vars.tcp_address = "$check_address$"
304 vars.tcp_refuse = "crit"
305 vars.tcp_mismatch = "warn"
306 vars.tcp_timeout = 10
307 vars.check_ipv4 = "$tcp_ipv4$"
308 vars.check_ipv6 = "$tcp_ipv6$"
311 object CheckCommand "ssl" {
312 import "ipv4-or-ipv6"
314 command = [ PluginDir + "/check_tcp" ]
318 value = "$ssl_address$"
319 description = "Host address"
323 description ="TCP port (default: 443)"
326 description = "Use SSL for the connection"
329 value = "$ssl_timeout$"
330 description = "Seconds before connection times out (default: 10)"
333 var days_warn = macro("$ssl_cert_valid_days_warn$")
334 var days_critical = macro("$ssl_cert_valid_days_critical$")
337 return days_warn + "," + days_critical
345 description = "Enable SSL/TLS hostname extension support (SNI)"
349 vars.ssl_address = "$check_address$"
351 vars.ssl_cert_valid_days_warn = false
352 vars.ssl_cert_valid_days_critical = false
356 object CheckCommand "udp" {
357 import "ipv4-or-ipv6"
360 PluginDir + "/check_udp",
361 "-H", "$udp_address$",
369 description = "String to send to the server"
372 value = "$udp_expect$"
374 description = " String to expect in server response"
378 description = "String to send server to initiate a clean close of the connection"
381 set_if = "$udp_ipv4$"
382 description = "Use IPv4 connection"
385 set_if = "$udp_ipv6$"
386 description = "Use IPv6 connection"
390 vars.udp_address = "$check_address$"
391 vars.check_ipv4 = "$udp_ipv4$"
392 vars.check_ipv6 = "$udp_ipv6$"
395 object CheckCommand "http" {
396 import "ipv4-or-ipv6"
398 command = [ PluginDir + "/check_http" ]
402 value = "$http_vhost$"
403 description = "Host name argument for servers using host headers (virtual host)"
406 value = "$http_address$"
407 description = "IP address or name (use numeric address if possible to bypass DNS lookup)"
411 description = "URL to GET or POST (default: /)"
414 value = "$http_port$"
415 description = "Port number (default: 80)"
418 set_if = "$http_ssl$"
419 description = "Connect via SSL"
422 set_if = "$http_ssl_force_tlsv1$"
423 description = "Connect via SSL version TLSv1"
426 set_if = "$http_ssl_force_tlsv1_1$"
427 description = "Connect via SSL version TLSv1.1"
430 set_if = "$http_ssl_force_tlsv1_2$"
431 description = "Connect via SSL version TLSv1.2"
434 set_if = "$http_ssl_force_sslv2$"
435 description = "Connect via SSL version SSLv2"
438 set_if = "$http_ssl_force_sslv3$"
439 description = "Connect via SSL version SSLv3"
442 set_if = "$http_ssl_force_tlsv1_or_higher$"
443 description = "Connect via SSL version TLSv1 and newer"
446 set_if = "$http_ssl_force_tlsv1_1_or_higher$"
447 description = "Connect via SSL version TLSv1.1 and newer"
450 set_if = "$http_ssl_force_tlsv1_2_or_higher$"
451 description = "Connect via SSL version TLSv1.2 and newer"
454 set_if = "$http_ssl_force_sslv2_or_higher$"
455 description = "Connect via SSL version SSLv2 and newer"
458 set_if = "$http_ssl_force_sslv3_or_higher$"
459 description = "Connect via SSL version SSLv3 and newer"
462 set_if = "$http_sni$"
463 description = "Enable SSL/TLS hostname extension support (SNI)"
466 value = "$http_certificate$"
467 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."
470 value = "$http_clientcert$"
471 description = "Name of file contains the client certificate (PEM format)"
474 value = "$http_privatekey$"
475 description = "Name of file contains the private key (PEM format)"
478 value = "$http_auth_pair$"
479 description = "Username:password on sites with basic authentication"
482 set_if = "$http_ignore_body$"
483 description = "Don't wait for document body: stop reading after headers"
486 value = "$http_warn_time$"
487 description = "Response time to result in warning status (seconds)"
490 value = "$http_critical_time$"
491 description = "Response time to result in critical status (seconds)"
494 value = "$http_expect$"
495 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.)"
498 value = "$http_headerstring$"
499 description = "String to expect in the response headers"
502 value = "$http_string$"
503 description = "String to expect in the content"
506 value = "$http_post$"
507 description = "URL encoded http POST data"
510 value = "$http_method$"
511 description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
514 value = "$http_maxage$"
515 description = "Warn if document is more than seconds old"
518 value = "$http_contenttype$"
519 description = "Specify Content-Type header when POSTing"
522 set_if = "$http_linespan$"
523 description = "Allow regex to span newline"
527 value = "$http_expect_body_regex$"
528 description = "Search page for regex"
532 value = "$http_expect_body_eregi$"
533 description = "Search page for case-insensitive regex"
537 set_if = "$http_invertregex$"
538 description = "Return CRITICAL if found, OK if not"
541 value = "$http_proxy_auth_pair$"
542 description = "Username:password on proxy-servers with basic authentication"
545 value = "$http_useragent$"
546 description = "String to be sent in http header as User Agent"
549 value = "$http_header$"
550 description = "Any other tags to be sent in http header"
553 set_if = "$http_extendedperfdata$"
554 description = "Print additional perfdata"
557 value = "$http_onredirect$"
558 description = "How to handle redirect pages"
561 value = "$http_pagesize$"
562 description = "Minim page size required:Maximum page size required"
565 value = "$http_timeout$"
566 description = "Seconds before connection times out"
569 set_if = "$http_ipv4$"
570 description = "Use IPv4 connection"
573 set_if = "$http_ipv6$"
574 description = "Use IPv6 connection"
577 set_if = "$http_link$"
578 description = "Wrap output in HTML link"
581 set_if = "$http_verbose$"
582 description = "Show details for command-line debugging"
586 vars.http_address = "$check_address$"
587 vars.http_ssl = false
588 vars.http_sni = false
589 vars.http_linespan = false
590 vars.http_invertregex = false
591 vars.check_ipv4 = "$http_ipv4$"
592 vars.check_ipv6 = "$http_ipv6$"
593 vars.http_link = false
594 vars.http_verbose = false
597 object CheckCommand "ftp" {
598 import "ipv4-or-ipv6"
600 command = [ PluginDir + "/check_ftp" ]
604 value = "$ftp_address$"
605 description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
609 description = "The FTP port number. Defaults to none"
612 value = "$ftp_expect$"
613 description = "String to expect in server response (may be repeated)."
617 description = "All expect strings need to occur in server response. Default is any."
622 set_if = "$ftp_escape_send$"
623 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
628 description = "String to send to the server."
633 set_if = "$ftp_escape_quit$"
634 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
639 description = "String to send server to initiate a clean close of the connection."
642 value = "$ftp_refuse$"
643 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
646 value = "$ftp_mismatch$"
647 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
650 set_if = "$ftp_jail$"
651 description = "Hide output from TCP socket."
654 value = "$ftp_maxbytes$"
655 description = "Close connection once more than this number of bytes are received."
658 value = "$ftp_delay$"
659 description = "Seconds to wait between sending string and polling for response."
662 value = "$ftp_certificate$"
663 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."
667 description = "Use SSL for the connection."
670 value = "$ftp_wtime$"
671 description = "Response time to result in warning status (seconds)."
674 value = "$ftp_ctime$"
675 description = "Response time to result in critical status (seconds)."
678 value = "$ftp_timeout$"
679 description = "Seconds before connection times out. Defaults to 10."
682 set_if = "$ftp_ipv4$"
683 description = "Use IPv4 connection"
686 set_if = "$ftp_ipv6$"
687 description = "Use IPv6 connection"
691 vars.ftp_address = "$check_address$"
693 vars.ftp_refuse = "crit"
694 vars.ftp_mismatch = "warn"
695 vars.ftp_timeout = 10
696 vars.check_ipv4 = "$ftp_ipv4$"
697 vars.check_ipv6 = "$ftp_ipv6$"
700 object CheckCommand "smtp" {
701 import "ipv4-or-ipv6"
703 command = [ PluginDir + "/check_smtp" ]
707 value = "$smtp_address$"
708 description = "Host name, IP Address, or unix socket (must be an absolute path)"
711 value = "$smtp_port$"
712 description = "Port number (default: 25)"
715 value = "$smtp_mail_from$"
716 description = "FROM-address to include in MAIL command, required by Exchange 2000"
719 value = "$smtp_expect$"
720 description = "String to expect in first line of server response (default: '220')"
723 value = "$smtp_command$"
724 description = "SMTP command"
727 value = "$smtp_response$"
728 description = "Expected response to command (may be used repeatedly)"
731 value = "$smtp_helo_fqdn$"
732 description = "FQDN used for HELO"
735 value = "$smtp_certificate_age$"
736 description = "Minimum number of days a certificate has to be valid"
739 set_if = "$smtp_starttls$"
740 description = "Use STARTTLS for the connection."
743 value = "$smtp_authtype$"
744 description = "SMTP AUTH type to check (default none, only LOGIN supported)"
747 value = "$smtp_authuser$"
748 description = "SMTP AUTH username"
751 value = "$smtp_authpass$"
752 description = "SMTP AUTH password"
755 value = "$smtp_ignore_quit$"
756 description = "Ignore failure when sending QUIT command to server"
759 value = "$smtp_warning$"
760 description = "Response time to result in warning status (seconds)"
763 value = "$smtp_critical$"
764 description = "Response time to result in critical status (seconds)"
767 value = "$smtp_timeout$"
768 description = "Seconds before connection times out (default: 10)"
771 set_if = "$smtp_ipv4$"
772 description = "Use IPv4 connection"
775 set_if = "$smtp_ipv6$"
776 description = "Use IPv6 connection"
780 vars.smtp_address = "$check_address$"
781 vars.check_ipv4 = "$smtp_ipv4$"
782 vars.check_ipv6 = "$smtp_ipv6$"
785 object CheckCommand "ssmtp" {
786 import "ipv4-or-ipv6"
788 command = [ PluginDir + "/check_ssmtp" ]
792 value = "$ssmtp_address$"
793 description = "Host name, IP Address, or unix socket (must be an absolute path)"
796 value = "$ssmtp_port$"
797 description = "Port number (default: none)"
800 value = "$ssmtp_escape$"
801 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"
804 value = "$ssmtp_send$"
805 description = "String to send to the server"
808 value = "$ssmtp_expect$"
809 description = "String to expect in server response (may be repeated)"
812 set_if = "$ssmtp_all$"
813 description = "All expect strings need to occur in server response. Default is any."
816 value = "$ssmtp_quit$"
817 description = "String to send server to initiate a clean close of the connection"
820 value = "$ssmtp_refuse$"
821 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
824 value = "$ssmtp_mismatch$"
825 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
828 set_if = "$ssmtp_jail$"
829 description = "Hide output from TCP socket."
832 value = "$ssmtp_maxbytes$"
833 description = "Close connection once more than this number of bytes are received"
836 value = "$ssmtp_delay$"
837 description = "Seconds to wait between sending string and polling for response"
840 value = "$ssmtp_certificate_age$"
841 description = "Minimum number of days a certificate has to be valid"
844 set_if = "$ssmtp_ssl$"
845 description = "Use SSL for the connection."
848 value = "$ssmtp_warning$"
849 description = "Response time to result in warning status (seconds)"
852 value = "$ssmtp_critical$"
853 description = "Response time to result in critical status (seconds)"
856 value = "$ssmtp_timeout$"
857 description = "Seconds before connection times out (default: 10)"
860 set_if = "$ssmtp_ipv4$"
861 description = "Use IPv4 connection"
864 set_if = "$ssmtp_ipv6$"
865 description = "Use IPv6 connection"
869 vars.ssmtp_address = "$check_address$"
870 vars.check_ipv4 = "$ssmtp_ipv4$"
871 vars.check_ipv6 = "$ssmtp_ipv6$"
874 object CheckCommand "imap" {
875 import "ipv4-or-ipv6"
877 command = [ PluginDir + "/check_imap" ]
881 value = "$imap_address$"
882 description = "Host name, IP Address, or unix socket (must be an absolute path)"
885 value = "$imap_port$"
886 description = "Port number (default: none)"
889 value = "$imap_escape$"
890 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"
893 value = "$imap_send$"
894 description = "String to send to the server"
897 value = "$imap_expect$"
898 description = "String to expect in server response (may be repeated)"
901 set_if = "$imap_all$"
902 description = "All expect strings need to occur in server response. Default is any."
905 value = "$imap_quit$"
906 description = "String to send server to initiate a clean close of the connection"
909 value = "$imap_refuse$"
910 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
913 value = "$imap_mismatch$"
914 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
917 set_if = "$imap_jail$"
918 description = "Hide output from TCP socket."
921 value = "$imap_maxbytes$"
922 description = "Close connection once more than this number of bytes are received"
925 value = "$imap_delay$"
926 description = "Seconds to wait between sending string and polling for response"
929 value = "$imap_certificate_age$"
930 description = "Minimum number of days a certificate has to be valid"
933 set_if = "$imap_ssl$"
934 description = "Use SSL for the connection."
937 value = "$imap_warning$"
938 description = "Response time to result in warning status (seconds)"
941 value = "$imap_critical$"
942 description = "Response time to result in critical status (seconds)"
945 value = "$imap_timeout$"
946 description = "Seconds before connection times out (default: 10)"
949 set_if = "$imap_ipv4$"
950 description = "Use IPv4 connection"
953 set_if = "$imap_ipv6$"
954 description = "Use IPv6 connection"
958 vars.imap_address = "$check_address$"
959 vars.check_ipv4 = "$imap_ipv4$"
960 vars.check_ipv6 = "$imap_ipv6$"
963 object CheckCommand "simap" {
964 import "ipv4-or-ipv6"
966 command = [ PluginDir + "/check_simap" ]
970 value = "$simap_address$"
971 description = "Host name, IP Address, or unix socket (must be an absolute path)"
974 value = "$simap_port$"
975 description = "Port number (default: none)"
978 value = "$simap_escape$"
979 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"
982 value = "$simap_send$"
983 description = "String to send to the server"
986 value = "$simap_expect$"
987 description = "String to expect in server response (may be repeated)"
990 set_if = "$simap_all$"
991 description = "All expect strings need to occur in server response. Default is any."
994 value = "$simap_quit$"
995 description = "String to send server to initiate a clean close of the connection"
998 value = "$simap_refuse$"
999 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1002 value = "$simap_mismatch$"
1003 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1006 set_if = "$simap_jail$"
1007 description = "Hide output from TCP socket."
1010 value = "$simap_maxbytes$"
1011 description = "Close connection once more than this number of bytes are received"
1014 value = "$simap_delay$"
1015 description = "Seconds to wait between sending string and polling for response"
1018 value = "$simap_certificate_age$"
1019 description = "Minimum number of days a certificate has to be valid"
1022 set_if = "$simap_ssl$"
1023 description = "Use SSL for the connection."
1026 value = "$simap_warning$"
1027 description = "Response time to result in warning status (seconds)"
1030 value = "$simap_critical$"
1031 description = "Response time to result in critical status (seconds)"
1034 value = "$simap_timeout$"
1035 description = "Seconds before connection times out (default: 10)"
1038 set_if = "$simap_ipv4$"
1039 description = "Use IPv4 connection"
1042 set_if = "$simap_ipv6$"
1043 description = "Use IPv6 connection"
1047 vars.simap_address = "$check_address$"
1048 vars.check_ipv4 = "$simap_ipv4$"
1049 vars.check_ipv6 = "$simap_ipv6$"
1052 object CheckCommand "pop" {
1053 import "ipv4-or-ipv6"
1055 command = [ PluginDir + "/check_pop" ]
1059 value = "$pop_address$"
1060 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1063 value = "$pop_port$"
1064 description = "Port number (default: none)"
1067 value = "$pop_escape$"
1068 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"
1071 value = "$pop_send$"
1072 description = "String to send to the server"
1075 value = "$pop_expect$"
1076 description = "String to expect in server response (may be repeated)"
1079 set_if = "$pop_all$"
1080 description = "All expect strings need to occur in server response. Default is any."
1083 value = "$pop_quit$"
1084 description = "String to send server to initiate a clean close of the connection"
1087 value = "$pop_refuse$"
1088 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1091 value = "$pop_mismatch$"
1092 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1095 set_if = "$pop_jail$"
1096 description = "Hide output from TCP socket."
1099 value = "$pop_maxbytes$"
1100 description = "Close connection once more than this number of bytes are received"
1103 value = "$pop_delay$"
1104 description = "Seconds to wait between sending string and polling for response"
1107 value = "$pop_certificate_age$"
1108 description = "Minimum number of days a certificate has to be valid"
1111 set_if = "$pop_ssl$"
1112 description = "Use SSL for the connection."
1115 value = "$pop_warning$"
1116 description = "Response time to result in warning status (seconds)"
1119 value = "$pop_critical$"
1120 description = "Response time to result in critical status (seconds)"
1123 value = "$pop_timeout$"
1124 description = "Seconds before connection times out (default: 10)"
1127 set_if = "$pop_ipv4$"
1128 description = "Use IPv4 connection"
1131 set_if = "$pop_ipv6$"
1132 description = "Use IPv6 connection"
1136 vars.pop_address = "$check_address$"
1137 vars.check_ipv4 = "$pop_ipv4$"
1138 vars.check_ipv6 = "$pop_ipv6$"
1141 object CheckCommand "spop" {
1142 import "ipv4-or-ipv6"
1144 command = [ PluginDir + "/check_spop" ]
1148 value = "$spop_address$"
1149 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1152 value = "$spop_port$"
1153 description = "Port number (default: none)"
1156 value = "$spop_escape$"
1157 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"
1160 value = "$spop_send$"
1161 description = "String to send to the server"
1164 value = "$spop_expect$"
1165 description = "String to expect in server response (may be repeated)"
1168 set_if = "$spop_all$"
1169 description = "All expect strings need to occur in server response. Default is any."
1172 value = "$spop_quit$"
1173 description = "String to send server to initiate a clean close of the connection"
1176 value = "$spop_refuse$"
1177 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1180 value = "$spop_mismatch$"
1181 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1184 set_if = "$spop_jail$"
1185 description = "Hide output from TCP socket."
1188 value = "$spop_maxbytes$"
1189 description = "Close connection once more than this number of bytes are received"
1192 value = "$spop_delay$"
1193 description = "Seconds to wait between sending string and polling for response"
1196 value = "$spop_certificate_age$"
1197 description = "Minimum number of days a certificate has to be valid"
1200 set_if = "$spop_ssl$"
1201 description = "Use SSL for the connection."
1204 value = "$spop_warning$"
1205 description = "Response time to result in warning status (seconds)"
1208 value = "$spop_critical$"
1209 description = "Response time to result in critical status (seconds)"
1212 value = "$spop_timeout$"
1213 description = "Seconds before connection times out (default: 10)"
1216 set_if = "$spop_ipv4$"
1217 description = "Use IPv4 connection"
1220 set_if = "$spop_ipv6$"
1221 description = "Use IPv6 connection"
1225 vars.spop_address = "$check_address$"
1226 vars.check_ipv4 = "$spop_ipv4$"
1227 vars.check_ipv6 = "$spop_ipv6$"
1230 object CheckCommand "ntp_time" {
1231 import "ipv4-or-ipv6"
1233 command = [ PluginDir + "/check_ntp_time" ]
1237 value = "$ntp_address$"
1238 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1241 value = "$ntp_port$"
1242 description = "Port number (default: 123)"
1245 set_if = "$ntp_quiet$"
1246 description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
1249 value = "$ntp_warning$"
1250 description = "Offset to result in warning status (seconds)"
1253 value = "$ntp_critical$"
1254 description = "Offset to result in critical status (seconds)"
1257 value = "$ntp_timeoffset$"
1258 description = "Expected offset of the ntp server relative to local server (seconds)"
1261 value = "$ntp_timeout$"
1262 description = "Seconds before connection times out (default: 10)"
1265 set_if = "$ntp_ipv4$"
1266 description = "Use IPv4 connection"
1269 set_if = "$ntp_ipv6$"
1270 description = "Use IPv6 connection"
1274 vars.ntp_address = "$check_address$"
1275 vars.check_ipv4 = "$ntp_ipv4$"
1276 vars.check_ipv6 = "$ntp_ipv6$"
1279 object CheckCommand "ntp_peer" {
1280 import "ipv4-or-ipv6"
1282 command = [ PluginDir + "/check_ntp_peer" ]
1286 value = "$ntp_address$"
1287 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1290 value = "$ntp_port$"
1291 description = "Port number (default: 123)"
1294 set_if = "$ntp_quiet$"
1295 description = "Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized"
1298 value = "$ntp_warning$"
1299 description = "Offset to result in warning status (seconds)"
1302 value = "$ntp_critical$"
1303 description = "Offset to result in critical status (seconds)"
1306 value = "$ntp_wstratum$"
1307 description = "Warning threshold for stratum of server's synchronization peer"
1310 value = "$ntp_cstratum$"
1311 description = "Critical threshold for stratum of server's synchronization peer"
1314 value = "$ntp_wjitter$"
1315 description = "Warning threshold for jitter"
1318 value = "$ntp_cjitter$"
1319 description = "Critical threshold for jitter"
1322 value = "$ntp_wsource$"
1323 description = "Warning threshold for number of usable time sources (truechimers)"
1326 value = "$ntp_csource$"
1327 description = "Critical threshold for number of usable time sources (truechimers)"
1330 value = "$ntp_timeout$"
1331 description = "Seconds before connection times out (default: 10)"
1334 set_if = "$ntp_ipv4$"
1335 description = "Use IPv4 connection"
1338 set_if = "$ntp_ipv6$"
1339 description = "Use IPv6 connection"
1343 vars.ntp_address = "$check_address$"
1344 vars.check_ipv4 = "$ntp_ipv4$"
1345 vars.check_ipv6 = "$ntp_ipv6$"
1348 object CheckCommand "ssh" {
1349 import "ipv4-or-ipv6"
1351 command = [ PluginDir + "/check_ssh" ]
1355 value = "$ssh_port$"
1356 description = "Port number (default: 22)"
1359 value = "$ssh_timeout$"
1360 description = "Seconds before connection times out (default: 10)"
1363 value = "$ssh_address$"
1368 set_if = "$ssh_ipv4$"
1369 description = "Use IPv4 connection"
1372 set_if = "$ssh_ipv6$"
1373 description = "Use IPv6 connection"
1377 vars.ssh_address = "$check_address$"
1378 vars.check_ipv4 = "$ssh_ipv4$"
1379 vars.check_ipv6 = "$ssh_ipv6$"
1382 object CheckCommand "disk" {
1383 command = [ PluginDir + "/check_disk" ]
1387 value = "$disk_wfree$"
1388 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"
1393 value = "$disk_cfree$"
1394 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"
1399 value = "$disk_inode_wfree$"
1400 description = "Exit with WARNING status if less than PERCENT of inode space is free"
1403 value = "$disk_inode_cfree$"
1404 description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1407 value = "$disk_partitions$"
1408 description = "Path or partition (may be repeated)"
1414 value = "$disk_partition$"
1418 value = "$disk_partitions_excluded$"
1419 description = "Ignore device (only works if -p unspecified)"
1423 value = "$disk_partition_excluded$"
1426 set_if = "$disk_clear$"
1427 description = "Clear thresholds"
1430 set_if = "$disk_exact_match$"
1431 description = "For paths or partitions specified with -p, only check for exact paths"
1434 set_if = "$disk_errors_only$"
1435 description = "Display only devices/mountpoints with errors"
1438 set_if = "$disk_ignore_reserved$"
1439 description = "Don't account root-reserved blocks into freespace in perfdata"
1442 value = "$disk_group$"
1443 description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1446 set_if = "$disk_kilobytes$"
1447 description = "Same as --units kB"
1450 set_if = "$disk_local$"
1451 description = " Only check local filesystems"
1454 set_if = "$disk_stat_remote_fs$"
1455 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)"
1458 set_if = "$disk_mountpoint$"
1459 description = "Display the mountpoint instead of the partition"
1462 set_if = "$disk_megabytes$"
1463 description = "Same as --units MB"
1466 set_if = "$disk_all$"
1467 description = "Explicitly select all paths. This is equivalent to -R .*"
1470 value = "$disk_eregi_path$"
1471 description = "Case insensitive regular expression for path/partition (may be repeated)"
1475 value = "$disk_ereg_path$"
1476 description = "Regular expression for path or partition (may be repeated)"
1480 value = "$disk_ignore_eregi_path$"
1481 description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1486 value = "$disk_ignore_ereg_path$"
1487 description = "Regular expression to ignore selected path or partition (may be repeated)"
1492 value = "$disk_timeout$"
1493 description = "Seconds before connection times out (default: 10)"
1496 value = "$disk_units$"
1497 description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1500 value = "$disk_exclude_type$"
1501 description = "Ignore all filesystems of indicated type (may be repeated)"
1506 vars.disk_wfree = "20%"
1507 vars.disk_cfree = "10%"
1508 vars.disk_megabytes = true
1509 vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "configfs", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ]
1512 object CheckCommand "disk_smb" {
1513 command = [ PluginDir + "/check_disk_smb" ]
1517 value = "$disk_smb_hostname$"
1518 description = "NetBIOS name of the server."
1521 value = "$disk_smb_share$"
1522 description = "Share name to be tested."
1525 value = "$disk_smb_workgroup$"
1526 description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1529 value = "$disk_smb_address$"
1530 description = "IP-address of HOST (only necessary if HOST is in another network)."
1533 value = "$disk_smb_username$"
1534 description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1537 value = "$disk_smb_password$"
1538 description = "Password to log in to server. (Defaults to an empty password if omitted)."
1541 value = "$disk_smb_wused$"
1542 description = "Percent of used space at which a warning will be generated (Default: 85%)."
1545 value = "$disk_smb_cused$"
1546 description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1549 value = "$disk_smb_port$"
1550 description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1554 vars.disk_smb_wused = "85%"
1555 vars.disk_smb_cused = "95%"
1558 object CheckCommand "users" {
1559 command = [ PluginDir + "/check_users" ]
1563 value = "$users_wgreater$"
1564 description = "Set WARNING status if more than INTEGER users are logged in"
1567 value = "$users_cgreater$"
1568 description = "Set CRITICAL status if more than INTEGER users are logged in"
1572 vars.users_wgreater = 20
1573 vars.users_cgreater = 50
1576 object CheckCommand "procs" {
1577 command = [ PluginDir + "/check_procs" ]
1581 value = "$procs_warning$"
1582 description = "Generate warning state if metric is outside this range"
1585 value = "$procs_critical$"
1586 description = "Generate critical state if metric is outside this range"
1589 value = "$procs_metric$"
1590 description = "Check thresholds against metric"
1593 value = "$procs_timeout$"
1594 description = "Seconds before plugin times out"
1597 set_if = "$procs_traditional$"
1598 description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1601 value = "$procs_state$"
1602 description = "Only scan for processes that have one or more of the status flags you specify"
1605 value = "$procs_ppid$"
1606 description = "Only scan for children of the parent process ID indicated"
1609 value = "$procs_vsz$"
1610 description = "Only scan for processes with VSZ higher than indicated"
1613 value = "$procs_rss$"
1614 description = "Only scan for processes with RSS higher than indicated"
1617 value = "$procs_pcpu$"
1618 description = "Only scan for processes with PCPU higher than indicated"
1621 value = "$procs_user$"
1622 description = "Only scan for processes with user name or ID indicated"
1625 value = "$procs_argument$"
1626 description = "Only scan for processes with args that contain STRING"
1628 "--ereg-argument-array" = {
1629 value = "$procs_argument_regex$"
1630 description = "Only scan for processes with args that contain the regex STRING"
1633 value = "$procs_command$"
1634 description = "Only scan for exact matches of COMMAND (without path)"
1637 set_if = "$procs_nokthreads$"
1638 description = "Only scan for non kernel threads"
1642 vars.procs_traditional = false
1643 vars.procs_nokthreads = false
1644 vars.procs_warning = 250
1645 vars.procs_critical = 400
1648 object CheckCommand "swap" {
1649 command = [ PluginDir + "/check_swap" ]
1653 if (macro("$swap_integer$")) {
1654 return macro("$swap_wfree$")
1656 return macro("$swap_wfree$%")
1660 if (macro("$swap_integer$")) {
1661 return macro("$swap_cfree$")
1663 return macro("$swap_cfree$%")
1667 set_if = "$swap_allswaps$"
1668 description = "Conduct comparisons for all swap partitions, one by one"
1671 value = "$swap_noswap$"
1672 description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1676 vars.swap_wfree = 50
1677 vars.swap_cfree = 25
1678 vars.swap_integer = false
1679 vars.swap_allswaps = false
1682 object CheckCommand "load" {
1683 command = [ PluginDir + "/check_load" ]
1687 value = "$load_wload1$,$load_wload5$,$load_wload15$"
1688 description = "Exit with WARNING status if load average exceeds WLOADn"
1691 value = "$load_cload1$,$load_cload5$,$load_cload15$"
1692 description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1695 set_if = "$load_percpu$"
1696 description = "Divide the load averages by the number of CPUs (when possible)"
1700 vars.load_wload1 = 5.0
1701 vars.load_wload5 = 4.0
1702 vars.load_wload15 = 3.0
1704 vars.load_cload1 = 10.0
1705 vars.load_cload5 = 6.0
1706 vars.load_cload15 = 4.0
1708 vars.load_percpu = false
1711 object CheckCommand "snmp" {
1712 command = [ PluginDir + "/check_snmp" ]
1716 value = "$snmp_address$"
1717 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1720 value = "$snmp_oid$"
1721 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1724 value = "$snmp_community$"
1725 description = "Optional community string for SNMP communication (default is 'public')"
1728 value = "$snmp_crit$"
1729 description = "Critical threshold range(s)"
1732 value = "$snmp_warn$"
1733 description = "Warning threshold range(s)"
1736 value = "$snmp_string$"
1737 description = "Return OK state (for that OID) if STRING is an exact match"
1740 value = "$snmp_ereg$"
1741 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1744 value = "$snmp_eregi$"
1745 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1748 value = "$snmp_label$"
1749 description = "Prefix label for output from plugin"
1752 value = "$snmp_units$"
1753 description = "Units label(s) for output data (e.g., 'sec.')"
1756 value = "$snmp_timeout$"
1757 description = "Seconds before connection times out (default: 10)"
1760 value = "$snmp_port$"
1761 description = "Port number (default: 161)"
1764 value = "$snmp_retries$"
1765 description = "Number of retries to be used in the requests"
1767 "--invert-search" = {
1768 set_if = "$snmp_invert_search$"
1769 description = "Invert search result and return CRITICAL if found"
1772 value = "$snmp_version$"
1773 description = "SNMP protocol version"
1776 value = "$snmp_miblist$"
1777 description = "List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL' for symbolic OIDs.)"
1779 "--rate-multiplier" = {
1780 value = "$snmp_rate_multiplier$"
1781 description = "Converts rate per second. For example, set to 60 to convert to per minute"
1784 set_if = "$snmp_rate$"
1785 description = "Enable rate calculation"
1788 set_if = "$snmp_getnext$"
1789 description = "Use SNMP GETNEXT instead of SNMP GET"
1792 value = "$snmp_offset$"
1793 description = "Add/substract the specified OFFSET to numeric sensor data"
1796 value = "$snmp_output_delimiter$"
1797 description = "Separates output on multiple OID requests"
1800 set_if = "$snmp_perf_oids$"
1801 description = "Label performance data with OIDs instead of --label's"
1805 vars.snmp_address = {{
1806 var addr_v4 = macro("$address$")
1807 var addr_v6 = macro("$address6$")
1812 return "udp6:[" + addr_v6 + "]"
1816 vars.snmp_community = "public"
1817 vars.snmp_invert_search = false
1818 vars.snmp_timeout = "10"
1821 object CheckCommand "snmpv3" {
1822 import "ipv4-or-ipv6"
1824 command = [ PluginDir + "/check_snmp" ]
1828 value = "$snmpv3_address$"
1829 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1832 value = "$snmpv3_port$"
1833 description = "Port number"
1836 set_if = "$snmpv3_getnext$"
1837 description = "Use SNMP GETNEXT instead of SNMP GET"
1841 description = "SNMP protocol version"
1844 value = "$snmpv3_seclevel$"
1845 description = "SNMPv3 securityLevel"
1848 value = "$snmpv3_auth_alg$"
1849 description = "SNMPv3 auth proto"
1852 value = "$snmpv3_user$"
1853 description = "SNMPv3 username"
1856 value = "$snmpv3_auth_key$"
1857 description = "SNMPv3 authentication password"
1860 value = "$snmpv3_priv_key$"
1861 description = "SNMPv3 privacy password"
1864 value = "$snmpv3_oid$"
1865 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1868 value = "$snmpv3_priv_alg$"
1869 description = "SNMPv3 priv proto (default DES)"
1872 value = "$snmpv3_warn$"
1873 description = "Warning threshold range(s)"
1876 value = "$snmpv3_crit$"
1877 description = "Critical threshold range(s)"
1880 value = "$snmpv3_string$"
1881 description = "Return OK state (for that OID) if STRING is an exact match"
1884 value = "$snmpv3_ereg$"
1885 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1888 value = "$snmpv3_eregi$"
1889 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1891 "--invert-search" = {
1892 set_if = "$snmpv3_invert_search$"
1893 description = "Invert search result and return CRITICAL if found"
1896 value = "$snmpv3_label$"
1897 description = "Prefix label for output from plugin"
1900 value = "$snmpv3_miblist$"
1901 description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1904 value = "$snmpv3_units$"
1905 description = "Units label(s) for output data (e.g., 'sec.')"
1907 "--rate-multiplier" = {
1908 value = "$snmpv3_rate_multiplier$"
1909 description = "Converts rate per second. For example, set to 60 to convert to per minute"
1912 set_if = "$snmpv3_rate$"
1913 description = "Enable rate calculation"
1916 value = "$snmpv3_timeout$"
1917 description = "Seconds before connection times out (default: 10)"
1921 vars.snmpv3_address = "$check_address$"
1922 vars.snmpv3_auth_alg = "SHA"
1923 vars.snmpv3_priv_alg = "AES"
1924 vars.snmpv3_seclevel = "authPriv"
1925 vars.snmpv3_timeout = "10"
1928 object CheckCommand "snmp-uptime" {
1931 vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1934 object CheckCommand "apt" {
1935 command = [ PluginDir + "/check_apt" ]
1939 value = "$apt_extra_opts$"
1940 description = "Read options from an ini file."
1943 value = "$apt_upgrade$"
1944 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."
1946 "--dist-upgrade" = {
1947 value = "$apt_dist_upgrade$"
1948 description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1951 value = "$apt_include$"
1952 description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1955 value = "$apt_exclude$"
1956 description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1959 value = "$apt_critical$"
1960 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."
1963 value = "$apt_timeout$"
1964 description = "Seconds before plugin times out (default: 10)."
1966 "--only-critical" = {
1967 set_if = "$apt_only_critical$"
1968 description = "Only warn about critical upgrades."
1975 object CheckCommand "dhcp" {
1976 command = [ PluginDir + "/check_dhcp" ]
1980 value = "$dhcp_serverip$"
1981 description = "IP address of DHCP server that we must hear from"
1984 value = "$dhcp_requestedip$"
1985 description = "IP address that should be offered by at least one DHCP server"
1988 value = "$dhcp_timeout$"
1989 description = "Seconds to wait for DHCPOFFER before timeout occurs"
1992 value = "$dhcp_interface$"
1993 description = "Interface to to use for listening (i.e. eth0)"
1996 value = "$dhcp_mac$"
1997 description = "MAC address to use in the DHCP request"
2000 set_if = "$dhcp_unicast$"
2001 description = "Unicast testing: mimic a DHCP relay"
2005 vars.dhcp_unicast = false
2008 object CheckCommand "dns" {
2009 import "ipv4-or-ipv6"
2011 command = [ PluginDir + "/check_dns" ]
2015 value = "$dns_lookup$"
2016 description = "The name or address you want to query."
2019 value = "$dns_server$"
2020 description = "Optional DNS server you want to use for the lookup."
2023 value = "$dns_query_type$"
2024 description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
2027 value = "$dns_expected_answers$"
2028 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)."
2031 set_if = "$dns_authoritative$"
2032 description = "Optionally expect the DNS server to be authoritative for the lookup"
2035 set_if = "$dns_accept_cname$"
2036 description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
2039 value = "$dns_wtime$"
2040 description = "Return warning if elapsed time exceeds value."
2043 value = "$dns_ctime$"
2044 description = "Return critical if elapsed time exceeds value."
2047 value = "$dns_timeout$"
2048 description = "Seconds before connection times out. Defaults to 10."
2052 vars.dns_lookup = "$host.name$"
2053 vars.dns_timeout = 10
2056 object CheckCommand "dig" {
2057 import "ipv4-or-ipv6"
2059 command = [ PluginDir + "/check_dig" ]
2063 value = "$dig_server$"
2064 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2067 value = "$dig_port$"
2068 description = "Port number (default: 53)"
2071 value = "$dig_lookup$"
2073 description = "Machine name to lookup"
2076 value = "$dig_record_type$"
2077 description = "Record type to lookup (default: A)"
2080 value = "$dig_expected_address$"
2081 description = "An address expected to be in the answer section"
2084 value = "$dig_arguments$"
2085 description = "Pass STRING as argument(s) to dig"
2088 value = "$dig_warning$"
2089 description = "Response time to result in warning status (seconds)"
2092 value = "$dig_critical$"
2093 description = "Response time to result in critical status (seconds)"
2096 value = "$dig_timeout$"
2097 description = "Seconds before connection times out (default: 10)"
2100 set_if = "$dig_ipv4$"
2101 description = "Force dig to only use IPv4 query transport"
2104 set_if = "$dig_ipv6$"
2105 description = "Force dig to only use IPv6 query transport"
2109 vars.dig_server = "$check_address$"
2110 vars.check_ipv4 = "$dig_ipv4$"
2111 vars.check_ipv6 = "$dig_ipv6$"
2114 object CheckCommand "nscp" {
2115 import "ipv4-or-ipv6"
2117 command = [ PluginDir + "/check_nt" ]
2121 value = "$nscp_address$"
2122 description = "Name of the host to check"
2125 value = "$nscp_port$"
2126 description = "Optional port number (default: 1248)"
2129 value = "$nscp_password$"
2130 description = "Password needed for the request"
2133 value = "$nscp_variable$"
2135 description = "Variable to check"
2138 value = "$nscp_params$"
2142 value = "$nscp_warn$"
2143 description = "Threshold which will result in a warning status"
2146 value = "$nscp_crit$"
2147 description = "Threshold which will result in a critical status"
2150 value = "$nscp_timeout$"
2151 description = "Seconds before connection attempt times out"
2155 set_if = "$nscp_showall$"
2156 description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
2160 vars.nscp_address = "$check_address$"
2161 vars.nscp_port = 12489
2162 vars.nscp_showall = false
2165 object CheckCommand "by_ssh" {
2166 import "ipv4-or-ipv6"
2168 command = [ PluginDir + "/check_by_ssh" ]
2172 value = "$by_ssh_address$"
2173 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2176 value = "$by_ssh_port$"
2177 description = "Port number (default: none)"
2180 var command = macro("$by_ssh_command$")
2181 var arguments = macro("$by_ssh_arguments$")
2183 if (typeof(command) == String && !arguments) {
2187 var escaped_args = []
2188 for (arg in resolve_arguments(command, arguments)) {
2189 escaped_args.add(escape_shell_arg(arg))
2191 return escaped_args.join(" ")
2194 value = "$by_ssh_logname$"
2195 description = "SSH user name on remote host [optional]"
2198 value = "$by_ssh_identity$"
2199 description = "identity of an authorized key [optional]"
2202 set_if = "$by_ssh_quiet$"
2203 description = "Tell ssh to suppress warning and diagnostic messages [optional]"
2206 value = "$by_ssh_warn$"
2207 description = "Response time to result in warning status (seconds)"
2210 value = "$by_ssh_crit$"
2211 description = "Response time to result in critical status (seconds)"
2214 value = "$by_ssh_timeout$"
2215 description = "Seconds before connection times out (default: 10)"
2218 value = "$by_ssh_options$"
2219 description = "Provide ssh options (may be repeated)"
2222 set_if = "$by_ssh_ipv4$"
2223 description = "Use IPv4 only"
2226 set_if = "$by_ssh_ipv6$"
2227 description = "Use IPv6 only"
2231 vars.by_ssh_address = "$check_address$"
2232 vars.by_ssh_quiet = false
2233 vars.check_ipv4 = "$by_ssh_ipv4$"
2234 vars.check_ipv6 = "$by_ssh_ipv6$"
2237 object CheckCommand "ups" {
2238 import "ipv4-or-ipv6"
2240 command = [ PluginDir + "/check_ups" ]
2244 value = "$ups_address$"
2245 description = "Address of the upsd server"
2249 value = "$ups_name$"
2250 description = "Name of the UPS to monitor"
2254 value = "$ups_port$"
2255 description = "Port number (default: 3493)"
2258 value = "$ups_variable$"
2259 description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
2262 value = "$ups_warning$"
2263 description = "Warning threshold for the selected variable"
2266 value = "$ups_critical$"
2267 description = "Critical threshold for the selected variable"
2270 set_if = "$ups_celsius$"
2271 description = "Display temperature in degrees Celsius instead of Fahrenheit"
2274 value = "$ups_timeout$"
2275 description = "Seconds before the connection times out (default: 10)"
2279 vars.ups_address = "$check_address$"
2280 vars.ups_name = "ups"
2283 object CheckCommand "nrpe" {
2284 import "ipv4-or-ipv6"
2286 command = [ PluginDir + "/check_nrpe" ]
2290 value = "$nrpe_address$"
2291 description = "The address of the host running the NRPE daemon"
2294 value = "$nrpe_port$"
2297 value = "$nrpe_command$"
2300 set_if = "$nrpe_no_ssl$"
2301 description = "Do not use SSL"
2304 set_if = "$nrpe_timeout_unknown$"
2305 description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
2308 value = "$nrpe_timeout$"
2309 description = "<interval>:<state> = <Number of seconds before connection times out>:<Check state to exit with in the event of a timeout (default=CRITICAL)>"
2312 value = "$nrpe_arguments$"
2317 set_if = "$nrpe_ipv4$"
2318 description = "Use IPv4 connection"
2321 set_if = "$nrpe_ipv6$"
2322 description = "Use IPv6 connection"
2325 set_if = "$nrpe_version_2$"
2326 description = "Use this if you want to connect to NRPE v2"
2330 vars.nrpe_address = "$check_address$"
2331 vars.nrpe_no_ssl = false
2332 vars.nrpe_timeout_unknown = false
2333 vars.check_ipv4 = "$nrpe_ipv4$"
2334 vars.check_ipv6 = "$nrpe_ipv6$"
2335 vars.nrpe_version_2 = false
2339 object CheckCommand "hpjd" {
2340 import "ipv4-or-ipv6"
2342 command = [ PluginDir + "/check_hpjd" ]
2346 value = "$hpjd_address$"
2347 description = "Host address"
2350 value = "$hpjd_community$"
2351 description = "The SNMP community name (default=public)"
2354 value = "$hpjd_port$"
2355 description = "Specify the port to check (default=161)"
2359 vars.hpjd_address = "$check_address$"
2362 object CheckCommand "icmp" {
2363 command = [ PluginDir + "/check_icmp" ]
2367 value = "$icmp_address$"
2370 description = "Host address"
2373 value = "$icmp_wrta$,$icmp_wpl$%"
2374 description = "warning threshold (currently 200.000ms,40%)"
2377 value = "$icmp_crta$,$icmp_cpl$%"
2378 description = "critical threshold (currently 500.000ms,80%)"
2381 value = "$icmp_source$"
2382 description = "specify a source IP address or device name"
2385 value = "$icmp_packets$"
2386 description = "number of packets to send (currently 5)"
2389 value = "$icmp_packet_interval$"
2390 description = "max packet interval (currently 80.000ms)"
2393 value = "$icmp_target_interval$"
2394 description = "max target interval (currently 0.000ms)"
2397 value = "$icmp_hosts_alive$"
2398 description = "number of alive hosts required for success"
2401 value = "$icmp_data_bytes$"
2402 description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
2405 value = "$icmp_timeout$"
2406 description = "timeout value (seconds, currently 10)"
2409 value = "$icmp_ttl$"
2410 description = "TTL on outgoing packets (currently 0)"
2414 vars.icmp_address = "$address$"
2415 vars.icmp_wrta = 100
2417 vars.icmp_crta = 200
2421 object CheckCommand "ldap" {
2422 import "ipv4-or-ipv6"
2424 command = [ PluginDir + "/check_ldap" ]
2428 value = "$ldap_address$"
2429 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2432 value = "$ldap_port$"
2433 description = "Port number (default: 389)"
2436 value = "$ldap_attr$"
2437 description = "ldap attribute to search (default: \"(objectclass=*)\""
2440 value = "$ldap_base$"
2442 description = "ldap base (eg. ou=my unit, o=my org, c=at"
2445 value = "$ldap_bind$"
2446 description = "ldap bind DN (if required)"
2449 value = "$ldap_pass$"
2450 description = "ldap password (if required)"
2453 set_if = "$ldap_starttls$"
2454 description = "use starttls mechanism introduced in protocol version 3"
2457 set_if = "$ldap_ssl$"
2458 description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
2461 set_if = "$ldap_v2$"
2462 description = "Use LDAP protocol version 2"
2465 set_if = "$ldap_v3$"
2466 description = "Use LDAP protocol version 3"
2469 value = "$ldap_warning$"
2470 description = "Response time to result in warning status (seconds)"
2473 value = "$ldap_critical$"
2474 description = "Response time to result in critical status (seconds)"
2477 value = "$ldap_warning_entries$"
2478 description = "Number of found entries to result in warning status (optional)"
2481 value = "$ldap_critical_entries$"
2482 description = "Number of found entries to result in critical status (optional)"
2485 value = "$ldap_timeout$"
2486 description = "Seconds before connection times out (default: 10)"
2489 set_if = "$ldap_verbose$"
2490 description = "Show details for command-line debugging"
2494 vars.ldap_address = "$check_address$"
2496 vars.ldap_v3 = false
2497 vars.ldap_timeout = 10s
2498 vars.ldap_verbose = false
2501 object CheckCommand "clamd" {
2502 command = [ PluginDir + "/check_clamd" ]
2506 value = "$clamd_address$"
2507 description = "The host's address or unix socket (must be an absolute path)."
2511 value = "$clamd_port$"
2512 description = "Port number (default: none)."
2515 value = "$clamd_expect$"
2516 description = "String to expect in server response (may be repeated)."
2520 set_if = "$clamd_all$"
2521 description = "All expect strings need to occur in server response. Default is any."
2526 set_if = "$clamd_escape_send$"
2527 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
2531 value = "$clamd_send$"
2532 description = "String to send to the server."
2537 set_if = "$clamd_escape_quit$"
2538 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
2542 value = "$clamd_quit$"
2543 description = "String to send server to initiate a clean close of the connection."
2546 value = "$clamd_refuse$"
2547 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
2550 value = "$clamd_mismatch$"
2551 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
2554 set_if = "$clamd_jail$"
2555 description = "Hide output from TCP socket."
2558 value = "$clamd_maxbytes$"
2559 description = "Close connection once more than this number of bytes are received."
2562 value = "$clamd_delay$"
2563 description = "Seconds to wait between sending string and polling for response."
2566 value = "$clamd_certificate$"
2567 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."
2570 set_if = "$clamd_ssl$"
2571 description = "Use SSL for the connection."
2574 value = "$clamd_wtime$"
2575 description = "Response time to result in warning status (seconds)."
2578 value = "$clamd_ctime$"
2579 description = "Response time to result in critical status (seconds)."
2582 value = "$clamd_timeout$"
2583 description = "Seconds before connection times out. Defaults to 10."
2586 set_if = "$clamd_ipv4$"
2587 description = "Use IPv4 only"
2590 set_if = "$clamd_ipv6$"
2591 description = "Use IPv6 only"
2595 vars.clamd_ssl = false
2596 vars.clamd_refuse = "crit"
2597 vars.clamd_mismatch = "warn"
2598 vars.clamd_timeout = 10
2599 vars.check_ipv4 = "$clamd_ipv4$"
2600 vars.check_ipv6 = "$clamd_ipv6$"
2603 object CheckCommand "mailq" {
2604 command = [ PluginDir + "/check_mailq" ]
2608 value = "$mailq_warning$"
2609 description = "Min. number of messages in queue to generate warning"
2613 value = "$mailq_critical$"
2614 description = "Min. number of messages in queue to generate critical alert ( w < c )"
2618 value = "$mailq_domain_warning$"
2619 description = "Min. number of messages for same domain in queue to generate warning"
2622 value = "$mailq_domain_critical$"
2623 description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2626 value = "$mailq_timeout$"
2627 description = "Plugin timeout in seconds (default = 15)"
2630 value = "$mailq_servertype$"
2631 description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2634 set_if = "$mailq_sudo$"
2635 description = "Use sudo for mailq command"
2640 object CheckCommand "pgsql" {
2641 import "ipv4-or-ipv6"
2643 command = [ PluginDir + "/check_pgsql" ]
2647 value = "$pgsql_hostname$"
2648 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2651 value = "$pgsql_port$"
2652 description = "Port number (default: 5432)"
2655 value = "$pgsql_database$"
2656 description = "Database to check (default: template1)"
2659 value = "$pgsql_username$"
2660 description = "Login name of user"
2663 value = "$pgsql_password$"
2664 description = "Password (BIG SECURITY ISSUE)"
2667 value = "$pgsql_options$"
2668 description = "Connection parameters (keyword = value), see below"
2671 value = "$pgsql_warning$"
2672 description = "Response time to result in warning status (seconds)"
2675 value = "$pgsql_critical$"
2676 description = "Response time to result in critical status (seconds)"
2679 value = "$pgsql_timeout$"
2680 description = "Seconds before connection times out (default: 10)"
2683 value = "$pgsql_query$"
2684 description = "SQL query to run. Only first column in first row will be read"
2687 value = "$pgsql_query_warning$"
2688 description = "SQL query value to result in warning status (double)"
2691 value = "$pgsql_query_critical$"
2692 description = "SQL query value to result in critical status (double)"
2696 vars.pgsql_hostname = "$check_address$"
2699 object CheckCommand "mysql" {
2700 import "ipv4-or-ipv6"
2702 command = [ PluginDir + "/check_mysql" ]
2706 value = "$mysql_hostname$"
2707 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2710 value = "$mysql_port$"
2711 description = "Port number (default: 3306)"
2714 set_if = "$mysql_ignore_auth$"
2715 description = "Ignore authentication failure and check for mysql connectivity only"
2718 value = "$mysql_socket$"
2719 description = "Use the specified socket"
2722 value = "$mysql_database$"
2723 description = "Check database with indicated name"
2726 value = "$mysql_file$"
2727 description = "Read from the specified client options file"
2730 value = "$mysql_group$"
2731 description = "Use a client options group"
2734 value = "$mysql_username$"
2735 description = "Connect using the indicated username"
2738 value = "$mysql_password$"
2739 description = "Use the indicated password to authenticate the connection"
2742 set_if = "$mysql_check_slave$"
2743 description = "Check if the slave thread is running properly"
2746 value = "$mysql_warning$"
2747 description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
2750 value = "$mysql_critical$"
2751 description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
2754 set_if = "$mysql_ssl$"
2755 description = "Use ssl encryptation"
2758 value = "$mysql_cacert$"
2759 description = "Path to CA signing the cert"
2762 value = "$mysql_cert$"
2763 description = "Path to SSL certificate"
2766 value = "$mysql_key$"
2767 description = "Path to private SSL key"
2770 value = "$mysql_cadir$"
2771 description = "Path to CA directory"
2774 value = "$mysql_ciphers$"
2775 description = "List of valid SSL ciphers"
2779 vars.mysql_hostname = "$check_address$"
2782 object CheckCommand "negate" {
2783 command = [ PluginDir + "/negate" ]
2787 value = "$negate_timeout$"
2788 description = "Seconds before plugin times out (default: 11)"
2791 value = "$negate_timeout_result$"
2792 description = "Custom result on Negate timeouts"
2795 value = "$negate_ok$"
2798 value = "$negate_warning$"
2801 value = "$negate_critical$"
2804 value = "$negate_unknown$"
2807 set_if = "$negate_substitute$"
2808 description = "Substitute output text as well. Will only substitute text in CAPITALS"
2810 "--wrapped-plugin" = {
2812 var command = macro("$negate_command$")
2813 var arguments = macro("$negate_arguments$")
2815 if (typeof(command) == String && !arguments) {
2819 var escaped_args = []
2820 for (arg in resolve_arguments(command, arguments)) {
2821 escaped_args.add(arg)
2823 return escaped_args.join(" ")
2830 vars.negate_timeout_result = "UNKNOWN"
2833 object CheckCommand "file_age" {
2834 command = [ PluginDir + "/check_file_age" ]
2838 value = "$file_age_warning_time$"
2839 description = "File must be no more than this many seconds old (default: 240s)"
2842 value = "$file_age_critical_time$"
2843 description = "File must be no more than this many seconds old (default: 600s)"
2846 value = "$file_age_warning_size$"
2847 description = "File must be at least this many bytes long"
2850 value = "$file_age_critical_size$"
2851 description = "File must be at least this many bytes long (default: 0B)"
2854 set_if = "$file_age_ignoremissing$"
2855 description = "return OK if the file does not exist"
2858 value = "$file_age_file$"
2859 description = "File to monitor"
2863 vars.file_age_ignoremissing = false
2866 object CheckCommand "smart" {
2867 command = [ PluginDir + "/check_ide_smart" ]
2871 value = "$smart_device$"
2872 description = "Name of a local hard drive to monitor"
2878 object CheckCommand "breeze" {
2879 import "ipv4-or-ipv6"
2881 command = [ PluginDir + "/check_breeze" ]
2885 value = "$breeze_hostname$"
2886 description = "Name or IP address of host to check"
2890 value = "$breeze_community$"
2891 description = "SNMPv1 community (default public)"
2894 value = "$breeze_warning$"
2895 description = "Percentage strength below which a WARNING status will result"
2899 value = "$breeze_critical$"
2900 description = "Percentage strength below which a CRITICAL status will result"
2905 vars.breeze_hostname = "$check_address$"
2906 vars.breeze_warning = "50"
2907 vars.breeze_critical = "20"
2910 object CheckCommand "flexlm" {
2911 command = [ PluginDir + "/check_flexlm" ]
2915 value = "$flexlm_licensefile$"
2916 description = "Name of license file (usually license.dat)"
2920 value = "$flexlm_timeout$"
2921 description = "Plugin time out in seconds (default = 15)"
2926 object CheckCommand "game" {
2927 import "ipv4-or-ipv6"
2929 command = [ PluginDir + "/check_game" ]
2933 value = "$game_port$"
2934 description = "Port to connect to"
2937 value = "$game_timeout$"
2938 description = "Seconds before connection times out (default: 10)"
2941 value = "$game_gamefield$"
2942 description = "Field number in raw qstat output that contains game name"
2945 value = "$game_mapfield$"
2946 description = "Field number in raw qstat output that contains map name"
2949 value = "$game_pingfield$"
2950 description = "Field number in raw qstat output that contains ping time"
2953 value = "$game_gametime$"
2954 description = "Field number in raw qstat output that contains game time"
2957 value = "$game_hostname$"
2958 description = "Name of the host running the game"
2961 value = "$game_game$"
2962 description = "Name of the game"
2967 value = "$game_ipaddress$"
2968 description = "Ipaddress of the game server to query"
2975 object CheckCommand "mysql_query" {
2976 import "ipv4-or-ipv6"
2978 command = [ PluginDir + "/check_mysql_query" ]
2982 value = "$mysql_query_hostname$"
2983 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2986 value = "$mysql_query_port$"
2987 description = "Port number (default: 3306)"
2990 value = "$mysql_query_username$"
2991 description = "Username to login with"
2994 value = "$mysql_query_password$"
2995 description = "Password to login with"
2998 value = "$mysql_query_database$"
2999 description = "Database to check"
3002 value = "$mysql_query_file$"
3003 description = "Read from the specified client options file"
3006 value = "$mysql_query_group$"
3007 description = "Use a client options group"
3010 value = "$mysql_query_execute$"
3011 description = "SQL query to run. Only first column in first row will be read"
3014 value = "$mysql_query_warning$"
3015 description = "Warning range (format: start:end). Alert if outside this range"
3018 value = "$mysql_query_critical$"
3019 description = "Critical range"
3023 vars.mysql_query_hostname = "$check_address$"
3026 object CheckCommand "radius" {
3027 import "ipv4-or-ipv6"
3030 PluginDir + "/check_radius",
3035 value = "$radius_address$",
3036 description = "Host name, IP Address, or unix socket (must be an absolute path)"
3039 value = "$radius_config_file$",
3040 description = "Configuration file"
3043 value = "$radius_username$",
3044 description = "The user to authenticate"
3047 value = "$radius_password$",
3048 description = "Password for authentication"
3051 value = "$radius_port$",
3052 description = "Port number (default: 1645)"
3055 value = "$radius_nas_id$",
3056 description = "NAS identifier"
3059 value = "$radius_nas_address$",
3060 description = "NAS IP Address"
3063 value = "$radius_expect$",
3064 description = "Response string to expect from the server"
3067 value = "$radius_retries$",
3068 description = "Number of times to retry a failed connection"
3071 value = "$radius_timeout$",
3072 description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
3076 vars.radius_address = "$check_address$"
3079 object CheckCommand "nscp_api" {
3080 import "ipv4-or-ipv6"
3082 command = [ PluginDir + "/check_nscp_api" ]
3086 value = "$nscp_api_host$"
3087 description = "NSCP API host address"
3091 value = "$nscp_api_port$"
3092 description = "NSCP API host port. Defaults to 8443."
3095 value = "$nscp_api_password$"
3096 description = "NSCP API password"
3099 value = "$nscp_api_query$"
3100 description = "NSCPI API Query endpoint to use"
3103 value = "$nscp_api_arguments$"
3104 description = "NSCP API Query arguments"
3109 vars.nscp_api_host = "$check_address$"