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 vars.ssl_address = "$check_address$"
347 vars.ssl_cert_valid_days_warn = false
348 vars.ssl_cert_valid_days_critical = false
349 vars.ssl_sni = "$ssl_address$"
353 object CheckCommand "udp" {
354 import "ipv4-or-ipv6"
357 PluginDir + "/check_udp",
358 "-H", "$udp_address$",
366 description = "String to send to the server"
369 value = "$udp_expect$"
371 description = " String to expect in server response"
375 description = "String to send server to initiate a clean close of the connection"
378 set_if = "$udp_ipv4$"
379 description = "Use IPv4 connection"
382 set_if = "$udp_ipv6$"
383 description = "Use IPv6 connection"
387 vars.udp_address = "$check_address$"
388 vars.check_ipv4 = "$udp_ipv4$"
389 vars.check_ipv6 = "$udp_ipv6$"
392 object CheckCommand "http" {
393 import "ipv4-or-ipv6"
395 command = [ PluginDir + "/check_http" ]
399 value = "$http_vhost$"
400 description = "Host name argument for servers using host headers (virtual host)"
403 value = "$http_address$"
404 description = "IP address or name (use numeric address if possible to bypass DNS lookup)"
408 description = "URL to GET or POST (default: /)"
411 value = "$http_port$"
412 description = "Port number (default: 80)"
415 set_if = "$http_ssl$"
416 description = "Connect via SSL"
419 set_if = "$http_ssl_force_tlsv1$"
420 description = "Connect via SSL version TLSv1"
423 set_if = "$http_ssl_force_tlsv1_1$"
424 description = "Connect via SSL version TLSv1.1"
427 set_if = "$http_ssl_force_tlsv1_2$"
428 description = "Connect via SSL version TLSv1.2"
431 set_if = "$http_ssl_force_sslv2$"
432 description = "Connect via SSL version SSLv2"
435 set_if = "$http_ssl_force_sslv3$"
436 description = "Connect via SSL version SSLv3"
439 set_if = "$http_ssl_force_tlsv1_or_higher$"
440 description = "Connect via SSL version TLSv1 and newer"
443 set_if = "$http_ssl_force_tlsv1_1_or_higher$"
444 description = "Connect via SSL version TLSv1.1 and newer"
447 set_if = "$http_ssl_force_tlsv1_2_or_higher$"
448 description = "Connect via SSL version TLSv1.2 and newer"
451 set_if = "$http_ssl_force_sslv2_or_higher$"
452 description = "Connect via SSL version SSLv2 and newer"
455 set_if = "$http_ssl_force_sslv3_or_higher$"
456 description = "Connect via SSL version SSLv3 and newer"
459 set_if = "$http_sni$"
460 description = "Enable SSL/TLS hostname extension support (SNI)"
463 value = "$http_certificate$"
464 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."
467 value = "$http_clientcert$"
468 description = "Name of file contains the client certificate (PEM format)"
471 value = "$http_privatekey$"
472 description = "Name of file contains the private key (PEM format)"
475 value = "$http_auth_pair$"
476 description = "Username:password on sites with basic authentication"
479 set_if = "$http_ignore_body$"
480 description = "Don't wait for document body: stop reading after headers"
483 value = "$http_warn_time$"
484 description = "Response time to result in warning status (seconds)"
487 value = "$http_critical_time$"
488 description = "Response time to result in critical status (seconds)"
491 value = "$http_expect$"
492 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.)"
495 value = "$http_headerstring$"
496 description = "String to expect in the response headers"
499 value = "$http_string$"
500 description = "String to expect in the content"
503 value = "$http_post$"
504 description = "URL encoded http POST data"
507 value = "$http_method$"
508 description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
511 value = "$http_maxage$"
512 description = "Warn if document is more than seconds old"
515 value = "$http_contenttype$"
516 description = "Specify Content-Type header when POSTing"
519 set_if = "$http_linespan$"
520 description = "Allow regex to span newline"
524 value = "$http_expect_body_regex$"
525 description = "Search page for regex"
529 value = "$http_expect_body_eregi$"
530 description = "Search page for case-insensitive regex"
534 set_if = "$http_invertregex$"
535 description = "Return CRITICAL if found, OK if not"
538 value = "$http_proxy_auth_pair$"
539 description = "Username:password on proxy-servers with basic authentication"
542 value = "$http_useragent$"
543 description = "String to be sent in http header as User Agent"
546 value = "$http_header$"
547 description = "Any other tags to be sent in http header"
550 set_if = "$http_extendedperfdata$"
551 description = "Print additional perfdata"
554 value = "$http_onredirect$"
555 description = "How to handle redirect pages"
558 value = "$http_pagesize$"
559 description = "Minim page size required:Maximum page size required"
562 value = "$http_timeout$"
563 description = "Seconds before connection times out"
566 set_if = "$http_ipv4$"
567 description = "Use IPv4 connection"
570 set_if = "$http_ipv6$"
571 description = "Use IPv6 connection"
574 set_if = "$http_link$"
575 description = "Wrap output in HTML link"
578 set_if = "$http_verbose$"
579 description = "Show details for command-line debugging"
583 vars.http_address = "$check_address$"
584 vars.http_ssl = false
585 vars.http_sni = false
586 vars.http_linespan = false
587 vars.http_invertregex = false
588 vars.check_ipv4 = "$http_ipv4$"
589 vars.check_ipv6 = "$http_ipv6$"
590 vars.http_link = false
591 vars.http_verbose = false
594 object CheckCommand "ftp" {
595 import "ipv4-or-ipv6"
597 command = [ PluginDir + "/check_ftp" ]
601 value = "$ftp_address$"
602 description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
606 description = "The FTP port number. Defaults to none"
609 value = "$ftp_expect$"
610 description = "String to expect in server response (may be repeated)."
614 description = "All expect strings need to occur in server response. Default is any."
619 set_if = "$ftp_escape_send$"
620 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
625 description = "String to send to the server."
630 set_if = "$ftp_escape_quit$"
631 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
636 description = "String to send server to initiate a clean close of the connection."
639 value = "$ftp_refuse$"
640 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
643 value = "$ftp_mismatch$"
644 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
647 set_if = "$ftp_jail$"
648 description = "Hide output from TCP socket."
651 value = "$ftp_maxbytes$"
652 description = "Close connection once more than this number of bytes are received."
655 value = "$ftp_delay$"
656 description = "Seconds to wait between sending string and polling for response."
659 value = "$ftp_certificate$"
660 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."
664 description = "Use SSL for the connection."
667 value = "$ftp_wtime$"
668 description = "Response time to result in warning status (seconds)."
671 value = "$ftp_ctime$"
672 description = "Response time to result in critical status (seconds)."
675 value = "$ftp_timeout$"
676 description = "Seconds before connection times out. Defaults to 10."
679 set_if = "$ftp_ipv4$"
680 description = "Use IPv4 connection"
683 set_if = "$ftp_ipv6$"
684 description = "Use IPv6 connection"
688 vars.ftp_address = "$check_address$"
690 vars.ftp_refuse = "crit"
691 vars.ftp_mismatch = "warn"
692 vars.ftp_timeout = 10
693 vars.check_ipv4 = "$ftp_ipv4$"
694 vars.check_ipv6 = "$ftp_ipv6$"
697 object CheckCommand "smtp" {
698 import "ipv4-or-ipv6"
700 command = [ PluginDir + "/check_smtp" ]
704 value = "$smtp_address$"
705 description = "Host name, IP Address, or unix socket (must be an absolute path)"
708 value = "$smtp_port$"
709 description = "Port number (default: 25)"
712 value = "$smtp_mail_from$"
713 description = "FROM-address to include in MAIL command, required by Exchange 2000"
716 value = "$smtp_expect$"
717 description = "String to expect in first line of server response (default: '220')"
720 value = "$smtp_command$"
721 description = "SMTP command"
724 value = "$smtp_response$"
725 description = "Expected response to command (may be used repeatedly)"
728 value = "$smtp_helo_fqdn$"
729 description = "FQDN used for HELO"
732 value = "$smtp_certificate_age$"
733 description = "Minimum number of days a certificate has to be valid"
736 set_if = "$smtp_starttls$"
737 description = "Use STARTTLS for the connection."
740 value = "$smtp_authtype$"
741 description = "SMTP AUTH type to check (default none, only LOGIN supported)"
744 value = "$smtp_authuser$"
745 description = "SMTP AUTH username"
748 value = "$smtp_authpass$"
749 description = "SMTP AUTH password"
752 value = "$smtp_ignore_quit$"
753 description = "Ignore failure when sending QUIT command to server"
756 value = "$smtp_warning$"
757 description = "Response time to result in warning status (seconds)"
760 value = "$smtp_critical$"
761 description = "Response time to result in critical status (seconds)"
764 value = "$smtp_timeout$"
765 description = "Seconds before connection times out (default: 10)"
768 set_if = "$smtp_ipv4$"
769 description = "Use IPv4 connection"
772 set_if = "$smtp_ipv6$"
773 description = "Use IPv6 connection"
777 vars.smtp_address = "$check_address$"
778 vars.check_ipv4 = "$smtp_ipv4$"
779 vars.check_ipv6 = "$smtp_ipv6$"
782 object CheckCommand "ssmtp" {
783 import "ipv4-or-ipv6"
785 command = [ PluginDir + "/check_ssmtp" ]
789 value = "$ssmtp_address$"
790 description = "Host name, IP Address, or unix socket (must be an absolute path)"
793 value = "$ssmtp_port$"
794 description = "Port number (default: none)"
797 value = "$ssmtp_escape$"
798 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"
801 value = "$ssmtp_send$"
802 description = "String to send to the server"
805 value = "$ssmtp_expect$"
806 description = "String to expect in server response (may be repeated)"
809 set_if = "$ssmtp_all$"
810 description = "All expect strings need to occur in server response. Default is any."
813 value = "$ssmtp_quit$"
814 description = "String to send server to initiate a clean close of the connection"
817 value = "$ssmtp_refuse$"
818 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
821 value = "$ssmtp_mismatch$"
822 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
825 set_if = "$ssmtp_jail$"
826 description = "Hide output from TCP socket."
829 value = "$ssmtp_maxbytes$"
830 description = "Close connection once more than this number of bytes are received"
833 value = "$ssmtp_delay$"
834 description = "Seconds to wait between sending string and polling for response"
837 value = "$ssmtp_certificate_age$"
838 description = "Minimum number of days a certificate has to be valid"
841 set_if = "$ssmtp_ssl$"
842 description = "Use SSL for the connection."
845 value = "$ssmtp_warning$"
846 description = "Response time to result in warning status (seconds)"
849 value = "$ssmtp_critical$"
850 description = "Response time to result in critical status (seconds)"
853 value = "$ssmtp_timeout$"
854 description = "Seconds before connection times out (default: 10)"
857 set_if = "$ssmtp_ipv4$"
858 description = "Use IPv4 connection"
861 set_if = "$ssmtp_ipv6$"
862 description = "Use IPv6 connection"
866 vars.ssmtp_address = "$check_address$"
867 vars.check_ipv4 = "$ssmtp_ipv4$"
868 vars.check_ipv6 = "$ssmtp_ipv6$"
871 object CheckCommand "imap" {
872 import "ipv4-or-ipv6"
874 command = [ PluginDir + "/check_imap" ]
878 value = "$imap_address$"
879 description = "Host name, IP Address, or unix socket (must be an absolute path)"
882 value = "$imap_port$"
883 description = "Port number (default: none)"
886 value = "$imap_escape$"
887 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"
890 value = "$imap_send$"
891 description = "String to send to the server"
894 value = "$imap_expect$"
895 description = "String to expect in server response (may be repeated)"
898 set_if = "$imap_all$"
899 description = "All expect strings need to occur in server response. Default is any."
902 value = "$imap_quit$"
903 description = "String to send server to initiate a clean close of the connection"
906 value = "$imap_refuse$"
907 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
910 value = "$imap_mismatch$"
911 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
914 set_if = "$imap_jail$"
915 description = "Hide output from TCP socket."
918 value = "$imap_maxbytes$"
919 description = "Close connection once more than this number of bytes are received"
922 value = "$imap_delay$"
923 description = "Seconds to wait between sending string and polling for response"
926 value = "$imap_certificate_age$"
927 description = "Minimum number of days a certificate has to be valid"
930 set_if = "$imap_ssl$"
931 description = "Use SSL for the connection."
934 value = "$imap_warning$"
935 description = "Response time to result in warning status (seconds)"
938 value = "$imap_critical$"
939 description = "Response time to result in critical status (seconds)"
942 value = "$imap_timeout$"
943 description = "Seconds before connection times out (default: 10)"
946 set_if = "$imap_ipv4$"
947 description = "Use IPv4 connection"
950 set_if = "$imap_ipv6$"
951 description = "Use IPv6 connection"
955 vars.imap_address = "$check_address$"
956 vars.check_ipv4 = "$imap_ipv4$"
957 vars.check_ipv6 = "$imap_ipv6$"
960 object CheckCommand "simap" {
961 import "ipv4-or-ipv6"
963 command = [ PluginDir + "/check_simap" ]
967 value = "$simap_address$"
968 description = "Host name, IP Address, or unix socket (must be an absolute path)"
971 value = "$simap_port$"
972 description = "Port number (default: none)"
975 value = "$simap_escape$"
976 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"
979 value = "$simap_send$"
980 description = "String to send to the server"
983 value = "$simap_expect$"
984 description = "String to expect in server response (may be repeated)"
987 set_if = "$simap_all$"
988 description = "All expect strings need to occur in server response. Default is any."
991 value = "$simap_quit$"
992 description = "String to send server to initiate a clean close of the connection"
995 value = "$simap_refuse$"
996 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
999 value = "$simap_mismatch$"
1000 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1003 set_if = "$simap_jail$"
1004 description = "Hide output from TCP socket."
1007 value = "$simap_maxbytes$"
1008 description = "Close connection once more than this number of bytes are received"
1011 value = "$simap_delay$"
1012 description = "Seconds to wait between sending string and polling for response"
1015 value = "$simap_certificate_age$"
1016 description = "Minimum number of days a certificate has to be valid"
1019 set_if = "$simap_ssl$"
1020 description = "Use SSL for the connection."
1023 value = "$simap_warning$"
1024 description = "Response time to result in warning status (seconds)"
1027 value = "$simap_critical$"
1028 description = "Response time to result in critical status (seconds)"
1031 value = "$simap_timeout$"
1032 description = "Seconds before connection times out (default: 10)"
1035 set_if = "$simap_ipv4$"
1036 description = "Use IPv4 connection"
1039 set_if = "$simap_ipv6$"
1040 description = "Use IPv6 connection"
1044 vars.simap_address = "$check_address$"
1045 vars.check_ipv4 = "$simap_ipv4$"
1046 vars.check_ipv6 = "$simap_ipv6$"
1049 object CheckCommand "pop" {
1050 import "ipv4-or-ipv6"
1052 command = [ PluginDir + "/check_pop" ]
1056 value = "$pop_address$"
1057 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1060 value = "$pop_port$"
1061 description = "Port number (default: none)"
1064 value = "$pop_escape$"
1065 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"
1068 value = "$pop_send$"
1069 description = "String to send to the server"
1072 value = "$pop_expect$"
1073 description = "String to expect in server response (may be repeated)"
1076 set_if = "$pop_all$"
1077 description = "All expect strings need to occur in server response. Default is any."
1080 value = "$pop_quit$"
1081 description = "String to send server to initiate a clean close of the connection"
1084 value = "$pop_refuse$"
1085 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1088 value = "$pop_mismatch$"
1089 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1092 set_if = "$pop_jail$"
1093 description = "Hide output from TCP socket."
1096 value = "$pop_maxbytes$"
1097 description = "Close connection once more than this number of bytes are received"
1100 value = "$pop_delay$"
1101 description = "Seconds to wait between sending string and polling for response"
1104 value = "$pop_certificate_age$"
1105 description = "Minimum number of days a certificate has to be valid"
1108 set_if = "$pop_ssl$"
1109 description = "Use SSL for the connection."
1112 value = "$pop_warning$"
1113 description = "Response time to result in warning status (seconds)"
1116 value = "$pop_critical$"
1117 description = "Response time to result in critical status (seconds)"
1120 value = "$pop_timeout$"
1121 description = "Seconds before connection times out (default: 10)"
1124 set_if = "$pop_ipv4$"
1125 description = "Use IPv4 connection"
1128 set_if = "$pop_ipv6$"
1129 description = "Use IPv6 connection"
1133 vars.pop_address = "$check_address$"
1134 vars.check_ipv4 = "$pop_ipv4$"
1135 vars.check_ipv6 = "$pop_ipv6$"
1138 object CheckCommand "spop" {
1139 import "ipv4-or-ipv6"
1141 command = [ PluginDir + "/check_spop" ]
1145 value = "$spop_address$"
1146 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1149 value = "$spop_port$"
1150 description = "Port number (default: none)"
1153 value = "$spop_escape$"
1154 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"
1157 value = "$spop_send$"
1158 description = "String to send to the server"
1161 value = "$spop_expect$"
1162 description = "String to expect in server response (may be repeated)"
1165 set_if = "$spop_all$"
1166 description = "All expect strings need to occur in server response. Default is any."
1169 value = "$spop_quit$"
1170 description = "String to send server to initiate a clean close of the connection"
1173 value = "$spop_refuse$"
1174 description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1177 value = "$spop_mismatch$"
1178 description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1181 set_if = "$spop_jail$"
1182 description = "Hide output from TCP socket."
1185 value = "$spop_maxbytes$"
1186 description = "Close connection once more than this number of bytes are received"
1189 value = "$spop_delay$"
1190 description = "Seconds to wait between sending string and polling for response"
1193 value = "$spop_certificate_age$"
1194 description = "Minimum number of days a certificate has to be valid"
1197 set_if = "$spop_ssl$"
1198 description = "Use SSL for the connection."
1201 value = "$spop_warning$"
1202 description = "Response time to result in warning status (seconds)"
1205 value = "$spop_critical$"
1206 description = "Response time to result in critical status (seconds)"
1209 value = "$spop_timeout$"
1210 description = "Seconds before connection times out (default: 10)"
1213 set_if = "$spop_ipv4$"
1214 description = "Use IPv4 connection"
1217 set_if = "$spop_ipv6$"
1218 description = "Use IPv6 connection"
1222 vars.spop_address = "$check_address$"
1223 vars.check_ipv4 = "$spop_ipv4$"
1224 vars.check_ipv6 = "$spop_ipv6$"
1227 object CheckCommand "ntp_time" {
1228 import "ipv4-or-ipv6"
1230 command = [ PluginDir + "/check_ntp_time" ]
1234 value = "$ntp_address$"
1235 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1238 value = "$ntp_port$"
1239 description = "Port number (default: 123)"
1242 set_if = "$ntp_quiet$"
1243 description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
1246 value = "$ntp_warning$"
1247 description = "Offset to result in warning status (seconds)"
1250 value = "$ntp_critical$"
1251 description = "Offset to result in critical status (seconds)"
1254 value = "$ntp_timeoffset$"
1255 description = "Expected offset of the ntp server relative to local server (seconds)"
1258 value = "$ntp_timeout$"
1259 description = "Seconds before connection times out (default: 10)"
1262 set_if = "$ntp_ipv4$"
1263 description = "Use IPv4 connection"
1266 set_if = "$ntp_ipv6$"
1267 description = "Use IPv6 connection"
1271 vars.ntp_address = "$check_address$"
1272 vars.check_ipv4 = "$ntp_ipv4$"
1273 vars.check_ipv6 = "$ntp_ipv6$"
1276 object CheckCommand "ntp_peer" {
1277 import "ipv4-or-ipv6"
1279 command = [ PluginDir + "/check_ntp_peer" ]
1283 value = "$ntp_address$"
1284 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1287 value = "$ntp_port$"
1288 description = "Port number (default: 123)"
1291 value = "$ntp_warning$"
1292 description = "Offset to result in warning status (seconds)"
1295 value = "$ntp_critical$"
1296 description = "Offset to result in critical status (seconds)"
1299 value = "$ntp_wstratum$"
1300 description = "Warning threshold for stratum of server's synchronization peer"
1303 value = "$ntp_cstratum$"
1304 description = "Critical threshold for stratum of server's synchronization peer"
1307 value = "$ntp_wjitter$"
1308 description = "Warning threshold for jitter"
1311 value = "$ntp_cjitter$"
1312 description = "Critical threshold for jitter"
1315 value = "$ntp_wsource$"
1316 description = "Warning threshold for number of usable time sources (truechimers)"
1319 value = "$ntp_csource$"
1320 description = "Critical threshold for number of usable time sources (truechimers)"
1323 value = "$ntp_timeout$"
1324 description = "Seconds before connection times out (default: 10)"
1327 set_if = "$ntp_ipv4$"
1328 description = "Use IPv4 connection"
1331 set_if = "$ntp_ipv6$"
1332 description = "Use IPv6 connection"
1336 vars.ntp_address = "$check_address$"
1337 vars.check_ipv4 = "$ntp_ipv4$"
1338 vars.check_ipv6 = "$ntp_ipv6$"
1341 object CheckCommand "ssh" {
1342 import "ipv4-or-ipv6"
1344 command = [ PluginDir + "/check_ssh" ]
1348 value = "$ssh_port$"
1349 description = "Port number (default: 22)"
1352 value = "$ssh_timeout$"
1353 description = "Seconds before connection times out (default: 10)"
1356 value = "$ssh_address$"
1361 set_if = "$ssh_ipv4$"
1362 description = "Use IPv4 connection"
1365 set_if = "$ssh_ipv6$"
1366 description = "Use IPv6 connection"
1370 vars.ssh_address = "$check_address$"
1371 vars.check_ipv4 = "$ssh_ipv4$"
1372 vars.check_ipv6 = "$ssh_ipv6$"
1375 object CheckCommand "disk" {
1376 command = [ PluginDir + "/check_disk" ]
1380 value = "$disk_wfree$"
1381 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"
1387 value = "$disk_cfree$"
1388 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"
1394 value = "$disk_inode_wfree$"
1395 description = "Exit with WARNING status if less than PERCENT of inode space is free"
1399 value = "$disk_inode_cfree$"
1400 description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1404 value = "$disk_partitions$"
1405 description = "Path or partition (may be repeated)"
1412 value = "$disk_partition$"
1417 value = "$disk_partitions_excluded$"
1418 description = "Ignore device (only works if -p unspecified)"
1423 value = "$disk_partition_excluded$"
1427 set_if = "$disk_clear$"
1428 description = "Clear thresholds"
1432 set_if = "$disk_exact_match$"
1433 description = "For paths or partitions specified with -p, only check for exact paths"
1437 set_if = "$disk_errors_only$"
1438 description = "Display only devices/mountpoints with errors"
1442 set_if = "$disk_ignore_reserved$"
1443 description = "Don't account root-reserved blocks into freespace in perfdata"
1447 value = "$disk_group$"
1448 description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1452 set_if = "$disk_kilobytes$"
1453 description = "Same as --units kB"
1457 set_if = "$disk_local$"
1458 description = " Only check local filesystems"
1462 set_if = "$disk_stat_remote_fs$"
1463 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)"
1467 set_if = "$disk_mountpoint$"
1468 description = "Display the mountpoint instead of the partition"
1472 set_if = "$disk_megabytes$"
1473 description = "Same as --units MB"
1477 set_if = "$disk_all$"
1478 description = "Explicitly select all paths. This is equivalent to -R .*"
1482 value = "$disk_eregi_path$"
1483 description = "Case insensitive regular expression for path/partition (may be repeated)"
1488 value = "$disk_ereg_path$"
1489 description = "Regular expression for path or partition (may be repeated)"
1494 value = "$disk_ignore_eregi_path$"
1495 description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1501 value = "$disk_ignore_ereg_path$"
1502 description = "Regular expression to ignore selected path or partition (may be repeated)"
1508 value = "$disk_timeout$"
1509 description = "Seconds before connection times out (default: 10)"
1513 value = "$disk_units$"
1514 description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1518 value = "$disk_exclude_type$"
1519 description = "Ignore all filesystems of indicated type (may be repeated)"
1524 vars.disk_wfree = "20%"
1525 vars.disk_cfree = "10%"
1526 vars.disk_megabytes = true
1527 vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ]
1530 object CheckCommand "disk_smb" {
1531 command = [ PluginDir + "/check_disk_smb" ]
1535 value = "$disk_smb_hostname$"
1536 description = "NetBIOS name of the server."
1539 value = "$disk_smb_share$"
1540 description = "Share name to be tested."
1543 value = "$disk_smb_workgroup$"
1544 description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1547 value = "$disk_smb_address$"
1548 description = "IP-address of HOST (only necessary if HOST is in another network)."
1551 value = "$disk_smb_username$"
1552 description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1555 value = "$disk_smb_password$"
1556 description = "Password to log in to server. (Defaults to an empty password if omitted)."
1559 value = "$disk_smb_wused$"
1560 description = "Percent of used space at which a warning will be generated (Default: 85%)."
1563 value = "$disk_smb_cused$"
1564 description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1567 value = "$disk_smb_port$"
1568 description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1572 vars.disk_smb_wused = "85%"
1573 vars.disk_smb_cused = "95%"
1576 object CheckCommand "users" {
1577 command = [ PluginDir + "/check_users" ]
1581 value = "$users_wgreater$"
1582 description = "Set WARNING status if more than INTEGER users are logged in"
1585 value = "$users_cgreater$"
1586 description = "Set CRITICAL status if more than INTEGER users are logged in"
1590 vars.users_wgreater = 20
1591 vars.users_cgreater = 50
1594 object CheckCommand "procs" {
1595 command = [ PluginDir + "/check_procs" ]
1599 value = "$procs_warning$"
1600 description = "Generate warning state if metric is outside this range"
1603 value = "$procs_critical$"
1604 description = "Generate critical state if metric is outside this range"
1607 value = "$procs_metric$"
1608 description = "Check thresholds against metric"
1611 value = "$procs_timeout$"
1612 description = "Seconds before plugin times out"
1615 set_if = "$procs_traditional$"
1616 description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1619 value = "$procs_state$"
1620 description = "Only scan for processes that have one or more of the status flags you specify"
1623 value = "$procs_ppid$"
1624 description = "Only scan for children of the parent process ID indicated"
1627 value = "$procs_vsz$"
1628 description = "Only scan for processes with VSZ higher than indicated"
1631 value = "$procs_rss$"
1632 description = "Only scan for processes with RSS higher than indicated"
1635 value = "$procs_pcpu$"
1636 description = "Only scan for processes with PCPU higher than indicated"
1639 value = "$procs_user$"
1640 description = "Only scan for processes with user name or ID indicated"
1643 value = "$procs_argument$"
1644 description = "Only scan for processes with args that contain STRING"
1646 "--ereg-argument-array" = {
1647 value = "$procs_argument_regex$"
1648 description = "Only scan for processes with args that contain the regex STRING"
1651 value = "$procs_command$"
1652 description = "Only scan for exact matches of COMMAND (without path)"
1655 set_if = "$procs_nokthreads$"
1656 description = "Only scan for non kernel threads"
1660 vars.procs_traditional = false
1661 vars.procs_nokthreads = false
1662 vars.procs_warning = 250
1663 vars.procs_critical = 400
1666 object CheckCommand "swap" {
1667 command = [ PluginDir + "/check_swap" ]
1671 if (macro("$swap_integer$")) {
1672 return macro("$swap_wfree$")
1674 return macro("$swap_wfree$%")
1678 if (macro("$swap_integer$")) {
1679 return macro("$swap_cfree$")
1681 return macro("$swap_cfree$%")
1685 set_if = "$swap_allswaps$"
1686 description = "Conduct comparisons for all swap partitions, one by one"
1689 value = "$swap_noswap$"
1690 description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1694 vars.swap_wfree = 50
1695 vars.swap_cfree = 25
1696 vars.swap_integer = false
1697 vars.swap_allswaps = false
1700 object CheckCommand "load" {
1701 command = [ PluginDir + "/check_load" ]
1705 value = "$load_wload1$,$load_wload5$,$load_wload15$"
1706 description = "Exit with WARNING status if load average exceeds WLOADn"
1709 value = "$load_cload1$,$load_cload5$,$load_cload15$"
1710 description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1713 set_if = "$load_percpu$"
1714 description = "Divide the load averages by the number of CPUs (when possible)"
1718 vars.load_wload1 = 5.0
1719 vars.load_wload5 = 4.0
1720 vars.load_wload15 = 3.0
1722 vars.load_cload1 = 10.0
1723 vars.load_cload5 = 6.0
1724 vars.load_cload15 = 4.0
1726 vars.load_percpu = false
1729 object CheckCommand "snmp" {
1730 command = [ PluginDir + "/check_snmp" ]
1734 value = "$snmp_address$"
1735 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1738 value = "$snmp_oid$"
1739 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1742 value = "$snmp_community$"
1743 description = "Optional community string for SNMP communication (default is 'public')"
1746 value = "$snmp_crit$"
1747 description = "Critical threshold range(s)"
1750 value = "$snmp_warn$"
1751 description = "Warning threshold range(s)"
1754 value = "$snmp_string$"
1755 description = "Return OK state (for that OID) if STRING is an exact match"
1758 value = "$snmp_ereg$"
1759 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1762 value = "$snmp_eregi$"
1763 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1766 value = "$snmp_label$"
1767 description = "Prefix label for output from plugin"
1770 value = "$snmp_units$"
1771 description = "Units label(s) for output data (e.g., 'sec.')"
1774 value = "$snmp_timeout$"
1775 description = "Seconds before connection times out (default: 10)"
1778 value = "$snmp_port$"
1779 description = "Port number (default: 161)"
1782 value = "$snmp_retries$"
1783 description = "Number of retries to be used in the requests"
1785 "--invert-search" = {
1786 set_if = "$snmp_invert_search$"
1787 description = "Invert search result and return CRITICAL if found"
1790 value = "$snmp_version$"
1791 description = "SNMP protocol version"
1794 value = "$snmp_miblist$"
1795 description = "List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL' for symbolic OIDs.)"
1797 "--rate-multiplier" = {
1798 value = "$snmp_rate_multiplier$"
1799 description = "Converts rate per second. For example, set to 60 to convert to per minute"
1802 set_if = "$snmp_rate$"
1803 description = "Enable rate calculation"
1806 set_if = "$snmp_getnext$"
1807 description = "Use SNMP GETNEXT instead of SNMP GET"
1811 vars.snmp_address = {{
1812 var addr_v4 = macro("$address$")
1813 var addr_v6 = macro("$address6$")
1818 return "udp6:[" + addr_v6 + "]"
1822 vars.snmp_community = "public"
1823 vars.snmp_invert_search = false
1824 vars.snmp_timeout = "10"
1827 object CheckCommand "snmpv3" {
1828 import "ipv4-or-ipv6"
1830 command = [ PluginDir + "/check_snmp" ]
1834 value = "$snmpv3_address$"
1835 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1838 value = "$snmpv3_port$"
1839 description = "Port number"
1842 set_if = "$snmpv3_getnext$"
1843 description = "Use SNMP GETNEXT instead of SNMP GET"
1847 description = "SNMP protocol version"
1850 value = "$snmpv3_seclevel$"
1851 description = "SNMPv3 securityLevel"
1854 value = "$snmpv3_auth_alg$"
1855 description = "SNMPv3 auth proto"
1858 value = "$snmpv3_user$"
1859 description = "SNMPv3 username"
1862 value = "$snmpv3_auth_key$"
1863 description = "SNMPv3 authentication password"
1866 value = "$snmpv3_priv_key$"
1867 description = "SNMPv3 privacy password"
1870 value = "$snmpv3_oid$"
1871 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1874 value = "$snmpv3_priv_alg$"
1875 description = "SNMPv3 priv proto (default DES)"
1878 value = "$snmpv3_warn$"
1879 description = "Warning threshold range(s)"
1882 value = "$snmpv3_crit$"
1883 description = "Critical threshold range(s)"
1886 value = "$snmpv3_string$"
1887 description = "Return OK state (for that OID) if STRING is an exact match"
1890 value = "$snmpv3_ereg$"
1891 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1894 value = "$snmpv3_eregi$"
1895 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1897 "--invert-search" = {
1898 set_if = "$snmpv3_invert_search$"
1899 description = "Invert search result and return CRITICAL if found"
1902 value = "$snmpv3_label$"
1903 description = "Prefix label for output from plugin"
1906 value = "$snmpv3_miblist$"
1907 description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1910 value = "$snmpv3_units$"
1911 description = "Units label(s) for output data (e.g., 'sec.')"
1913 "--rate-multiplier" = {
1914 value = "$snmpv3_rate_multiplier$"
1915 description = "Converts rate per second. For example, set to 60 to convert to per minute"
1918 set_if = "$snmpv3_rate$"
1919 description = "Enable rate calculation"
1922 value = "$snmpv3_timeout$"
1923 description = "Seconds before connection times out (default: 10)"
1927 vars.snmpv3_address = "$check_address$"
1928 vars.snmpv3_auth_alg = "SHA"
1929 vars.snmpv3_priv_alg = "AES"
1930 vars.snmpv3_seclevel = "authPriv"
1931 vars.snmpv3_timeout = "10"
1934 object CheckCommand "snmp-uptime" {
1937 vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1940 object CheckCommand "apt" {
1941 command = [ PluginDir + "/check_apt" ]
1945 value = "$apt_extra_opts$"
1946 description = "Read options from an ini file."
1949 value = "$apt_upgrade$"
1950 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."
1952 "--dist-upgrade" = {
1953 value = "$apt_dist_upgrade$"
1954 description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1957 value = "$apt_include$"
1958 description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1961 value = "$apt_exclude$"
1962 description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1965 value = "$apt_critical$"
1966 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."
1969 value = "$apt_timeout$"
1970 description = "Seconds before plugin times out (default: 10)."
1972 "--only-critical" = {
1973 set_if = "$apt_only_critical$"
1974 description = "Only warn about critical upgrades."
1981 object CheckCommand "dhcp" {
1982 command = [ PluginDir + "/check_dhcp" ]
1986 value = "$dhcp_serverip$"
1987 description = "IP address of DHCP server that we must hear from"
1990 value = "$dhcp_requestedip$"
1991 description = "IP address that should be offered by at least one DHCP server"
1994 value = "$dhcp_timeout$"
1995 description = "Seconds to wait for DHCPOFFER before timeout occurs"
1998 value = "$dhcp_interface$"
1999 description = "Interface to to use for listening (i.e. eth0)"
2002 value = "$dhcp_mac$"
2003 description = "MAC address to use in the DHCP request"
2006 set_if = "$dhcp_unicast$"
2007 description = "Unicast testing: mimic a DHCP relay"
2011 vars.dhcp_unicast = false
2014 object CheckCommand "dns" {
2015 import "ipv4-or-ipv6"
2017 command = [ PluginDir + "/check_dns" ]
2021 value = "$dns_lookup$"
2022 description = "The name or address you want to query."
2025 value = "$dns_server$"
2026 description = "Optional DNS server you want to use for the lookup."
2029 value = "$dns_query_type$"
2030 description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
2033 value = "$dns_expected_answers$"
2034 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)."
2037 set_if = "$dns_authoritative$"
2038 description = "Optionally expect the DNS server to be authoritative for the lookup"
2041 set_if = "$dns_accept_cname$"
2042 description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
2045 value = "$dns_wtime$"
2046 description = "Return warning if elapsed time exceeds value."
2049 value = "$dns_ctime$"
2050 description = "Return critical if elapsed time exceeds value."
2053 value = "$dns_timeout$"
2054 description = "Seconds before connection times out. Defaults to 10."
2058 vars.dns_lookup = "$host.name$"
2059 vars.dns_query_type = "A"
2060 vars.dns_timeout = 10
2063 object CheckCommand "dig" {
2064 import "ipv4-or-ipv6"
2066 command = [ PluginDir + "/check_dig" ]
2070 value = "$dig_server$"
2071 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2074 value = "$dig_port$"
2075 description = "Port number (default: 53)"
2078 value = "$dig_lookup$"
2080 description = "Machine name to lookup"
2083 value = "$dig_record_type$"
2084 description = "Record type to lookup (default: A)"
2087 value = "$dig_expected_address$"
2088 description = "An address expected to be in the answer section"
2091 value = "$dig_arguments$"
2092 description = "Pass STRING as argument(s) to dig"
2095 value = "$dig_warning$"
2096 description = "Response time to result in warning status (seconds)"
2099 value = "$dig_critical$"
2100 description = "Response time to result in critical status (seconds)"
2103 value = "$dig_timeout$"
2104 description = "Seconds before connection times out (default: 10)"
2107 set_if = "$dig_ipv4$"
2108 description = "Force dig to only use IPv4 query transport"
2111 set_if = "$dig_ipv6$"
2112 description = "Force dig to only use IPv6 query transport"
2116 vars.dig_server = "$check_address$"
2117 vars.check_ipv4 = "$dig_ipv4$"
2118 vars.check_ipv6 = "$dig_ipv6$"
2121 object CheckCommand "nscp" {
2122 import "ipv4-or-ipv6"
2124 command = [ PluginDir + "/check_nt" ]
2128 value = "$nscp_address$"
2129 description = "Name of the host to check"
2132 value = "$nscp_port$"
2133 description = "Optional port number (default: 1248)"
2136 value = "$nscp_password$"
2137 description = "Password needed for the request"
2140 value = "$nscp_variable$"
2142 description = "Variable to check"
2145 value = "$nscp_params$"
2149 value = "$nscp_warn$"
2150 description = "Threshold which will result in a warning status"
2153 value = "$nscp_crit$"
2154 description = "Threshold which will result in a critical status"
2157 value = "$nscp_timeout$"
2158 description = "Seconds before connection attempt times out"
2162 set_if = "$nscp_showall$"
2163 description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
2167 vars.nscp_address = "$check_address$"
2168 vars.nscp_port = 12489
2169 vars.nscp_showall = false
2172 object CheckCommand "by_ssh" {
2173 import "ipv4-or-ipv6"
2175 command = [ PluginDir + "/check_by_ssh" ]
2179 value = "$by_ssh_address$"
2180 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2183 value = "$by_ssh_port$"
2184 description = "Port number (default: none)"
2187 var command = macro("$by_ssh_command$")
2188 var arguments = macro("$by_ssh_arguments$")
2190 if (typeof(command) == String && !arguments) {
2194 var escaped_args = []
2195 for (arg in resolve_arguments(command, arguments)) {
2196 escaped_args.add(escape_shell_arg(arg))
2198 return escaped_args.join(" ")
2201 value = "$by_ssh_logname$"
2202 description = "SSH user name on remote host [optional]"
2205 value = "$by_ssh_identity$"
2206 description = "identity of an authorized key [optional]"
2209 set_if = "$by_ssh_quiet$"
2210 description = "Tell ssh to suppress warning and diagnostic messages [optional]"
2213 value = "$by_ssh_warn$"
2214 description = "Response time to result in warning status (seconds)"
2217 value = "$by_ssh_crit$"
2218 description = "Response time to result in critical status (seconds)"
2221 value = "$by_ssh_timeout$"
2222 description = "Seconds before connection times out (default: 10)"
2225 value = "$by_ssh_options$"
2226 description = "Provide ssh options (may be repeated)"
2229 set_if = "$by_ssh_ipv4$"
2230 description = "Use IPv4 only"
2233 set_if = "$by_ssh_ipv6$"
2234 description = "Use IPv6 only"
2238 vars.by_ssh_address = "$check_address$"
2239 vars.by_ssh_quiet = false
2240 vars.check_ipv4 = "$by_ssh_ipv4$"
2241 vars.check_ipv6 = "$by_ssh_ipv6$"
2244 object CheckCommand "ups" {
2245 import "ipv4-or-ipv6"
2247 command = [ PluginDir + "/check_ups" ]
2251 value = "$ups_address$"
2252 description = "Address of the upsd server"
2256 value = "$ups_name$"
2257 description = "Name of the UPS to monitor"
2261 value = "$ups_port$"
2262 description = "Port number (default: 3493)"
2265 value = "$ups_variable$"
2266 description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
2269 value = "$ups_warning$"
2270 description = "Warning threshold for the selected variable"
2273 value = "$ups_critical$"
2274 description = "Critical threshold for the selected variable"
2277 set_if = "$ups_celsius$"
2278 description = "Display temperature in degrees Celsius instead of Fahrenheit"
2281 value = "$ups_timeout$"
2282 description = "Seconds before the connection times out (default: 10)"
2286 vars.ups_address = "$check_address$"
2287 vars.ups_name = "ups"
2290 object CheckCommand "nrpe" {
2291 import "ipv4-or-ipv6"
2293 command = [ PluginDir + "/check_nrpe" ]
2297 value = "$nrpe_address$"
2301 value = "$nrpe_port$"
2305 value = "$nrpe_command$"
2309 set_if = "$nrpe_no_ssl$"
2310 description = "Do not use SSL."
2313 set_if = "$nrpe_timeout_unknown$"
2314 description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
2317 value = "$nrpe_timeout$"
2321 value = "$nrpe_arguments$"
2326 set_if = "$nrpe_ipv4$"
2327 description = "Use IPv4 connection"
2330 set_if = "$nrpe_ipv6$"
2331 description = "Use IPv6 connection"
2334 set_if = "$nrpe_version_2$"
2335 description = "Use this if you want to connect to NRPE v2"
2339 vars.nrpe_address = "$check_address$"
2340 vars.nrpe_no_ssl = false
2341 vars.nrpe_timeout_unknown = false
2342 vars.check_ipv4 = "$nrpe_ipv4$"
2343 vars.check_ipv6 = "$nrpe_ipv6$"
2344 vars.nrpe_version_2 = false
2348 object CheckCommand "hpjd" {
2349 import "ipv4-or-ipv6"
2351 command = [ PluginDir + "/check_hpjd" ]
2355 value = "$hpjd_address$"
2356 description = "Host address"
2359 value = "$hpjd_community$"
2360 description = "The SNMP community name (default=public)"
2363 value = "$hpjd_port$"
2364 description = "Specify the port to check (default=161)"
2368 vars.hpjd_address = "$check_address$"
2371 object CheckCommand "icmp" {
2372 command = [ PluginDir + "/check_icmp" ]
2376 value = "$icmp_address$"
2379 description = "Host address"
2382 value = "$icmp_wrta$,$icmp_wpl$%"
2383 description = "warning threshold (currently 200.000ms,40%)"
2386 value = "$icmp_crta$,$icmp_cpl$%"
2387 description = "critical threshold (currently 500.000ms,80%)"
2390 value = "$icmp_source$"
2391 description = "specify a source IP address or device name"
2394 value = "$icmp_packets$"
2395 description = "number of packets to send (currently 5)"
2398 value = "$icmp_packet_interval$"
2399 description = "max packet interval (currently 80.000ms)"
2402 value = "$icmp_target_interval$"
2403 description = "max target interval (currently 0.000ms)"
2406 value = "$icmp_hosts_alive$"
2407 description = "number of alive hosts required for success"
2410 value = "$icmp_data_bytes$"
2411 description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
2414 value = "$icmp_timeout$"
2415 description = "timeout value (seconds, currently 10)"
2418 value = "$icmp_ttl$"
2419 description = "TTL on outgoing packets (currently 0)"
2423 vars.icmp_address = "$address$"
2424 vars.icmp_wrta = 100
2426 vars.icmp_crta = 200
2430 object CheckCommand "ldap" {
2431 import "ipv4-or-ipv6"
2433 command = [ PluginDir + "/check_ldap" ]
2437 value = "$ldap_address$"
2438 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2441 value = "$ldap_port$"
2442 description = "Port number (default: 389)"
2445 value = "$ldap_attr$"
2446 description = "ldap attribute to search (default: \"(objectclass=*)\""
2449 value = "$ldap_base$"
2451 description = "ldap base (eg. ou=my unit, o=my org, c=at"
2454 value = "$ldap_bind$"
2455 description = "ldap bind DN (if required)"
2458 value = "$ldap_pass$"
2459 description = "ldap password (if required)"
2462 set_if = "$ldap_starttls$"
2463 description = "use starttls mechanism introduced in protocol version 3"
2466 set_if = "$ldap_ssl$"
2467 description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
2470 set_if = "$ldap_v2$"
2471 description = "Use LDAP protocol version 2"
2474 set_if = "$ldap_v3$"
2475 description = "Use LDAP protocol version 3"
2478 value = "$ldap_warning$"
2479 description = "Response time to result in warning status (seconds)"
2482 value = "$ldap_critical$"
2483 description = "Response time to result in critical status (seconds)"
2486 value = "$ldap_warning_entries$"
2487 description = "Number of found entries to result in warning status (optional)"
2490 value = "$ldap_critical_entries$"
2491 description = "Number of found entries to result in critical status (optional)"
2494 value = "$ldap_timeout$"
2495 description = "Seconds before connection times out (default: 10)"
2498 set_if = "$ldap_verbose$"
2499 description = "Show details for command-line debugging"
2503 vars.ldap_address = "$check_address$"
2505 vars.ldap_v3 = false
2506 vars.ldap_timeout = 10s
2507 vars.ldap_verbose = false
2510 object CheckCommand "clamd" {
2511 command = [ PluginDir + "/check_clamd" ]
2515 value = "$clamd_address$"
2516 description = "The host's address or unix socket (must be an absolute path)."
2520 value = "$clamd_port$"
2521 description = "Port number (default: none)."
2524 value = "$clamd_expect$"
2525 description = "String to expect in server response (may be repeated)."
2529 set_if = "$clamd_all$"
2530 description = "All expect strings need to occur in server response. Default is any."
2535 set_if = "$clamd_escape_send$"
2536 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
2540 value = "$clamd_send$"
2541 description = "String to send to the server."
2546 set_if = "$clamd_escape_quit$"
2547 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
2551 value = "$clamd_quit$"
2552 description = "String to send server to initiate a clean close of the connection."
2555 value = "$clamd_refuse$"
2556 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
2559 value = "$clamd_mismatch$"
2560 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
2563 set_if = "$clamd_jail$"
2564 description = "Hide output from TCP socket."
2567 value = "$clamd_maxbytes$"
2568 description = "Close connection once more than this number of bytes are received."
2571 value = "$clamd_delay$"
2572 description = "Seconds to wait between sending string and polling for response."
2575 value = "$clamd_certificate$"
2576 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."
2579 set_if = "$clamd_ssl$"
2580 description = "Use SSL for the connection."
2583 value = "$clamd_wtime$"
2584 description = "Response time to result in warning status (seconds)."
2587 value = "$clamd_ctime$"
2588 description = "Response time to result in critical status (seconds)."
2591 value = "$clamd_timeout$"
2592 description = "Seconds before connection times out. Defaults to 10."
2595 set_if = "$clamd_ipv4$"
2596 description = "Use IPv4 only"
2599 set_if = "$clamd_ipv6$"
2600 description = "Use IPv6 only"
2604 vars.clamd_ssl = false
2605 vars.clamd_refuse = "crit"
2606 vars.clamd_mismatch = "warn"
2607 vars.clamd_timeout = 10
2608 vars.check_ipv4 = "$clamd_ipv4$"
2609 vars.check_ipv6 = "$clamd_ipv6$"
2612 object CheckCommand "mailq" {
2613 command = [ PluginDir + "/check_mailq" ]
2617 value = "$mailq_warning$"
2618 description = "Min. number of messages in queue to generate warning"
2622 value = "$mailq_critical$"
2623 description = "Min. number of messages in queue to generate critical alert ( w < c )"
2627 value = "$mailq_domain_warning$"
2628 description = "Min. number of messages for same domain in queue to generate warning"
2631 value = "$mailq_domain_critical$"
2632 description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2635 value = "$mailq_timeout$"
2636 description = "Plugin timeout in seconds (default = 15)"
2639 value = "$mailq_servertype$"
2640 description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2643 set_if = "$mailq_sudo$"
2644 description = "Use sudo for mailq command"
2649 object CheckCommand "pgsql" {
2650 import "ipv4-or-ipv6"
2652 command = [ PluginDir + "/check_pgsql" ]
2656 value = "$pgsql_hostname$"
2657 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2660 value = "$pgsql_port$"
2661 description = "Port number (default: 5432)"
2664 value = "$pgsql_database$"
2665 description = "Database to check (default: template1)"
2668 value = "$pgsql_username$"
2669 description = "Login name of user"
2672 value = "$pgsql_password$"
2673 description = "Password (BIG SECURITY ISSUE)"
2676 value = "$pgsql_options$"
2677 description = "Connection parameters (keyword = value), see below"
2680 value = "$pgsql_warning$"
2681 description = "Response time to result in warning status (seconds)"
2684 value = "$pgsql_critical$"
2685 description = "Response time to result in critical status (seconds)"
2688 value = "$pgsql_timeout$"
2689 description = "Seconds before connection times out (default: 10)"
2692 value = "$pgsql_query$"
2693 description = "SQL query to run. Only first column in first row will be read"
2696 value = "$pgsql_query_warning$"
2697 description = "SQL query value to result in warning status (double)"
2700 value = "$pgsql_query_critical$"
2701 description = "SQL query value to result in critical status (double)"
2705 vars.pgsql_hostname = "$check_address$"
2708 object CheckCommand "mysql" {
2709 import "ipv4-or-ipv6"
2711 command = [ PluginDir + "/check_mysql" ]
2715 value = "$mysql_hostname$"
2716 description = "Host name, IP Address, or unix socket (must be an absolute path)"
2719 value = "$mysql_port$"
2720 description = "Port number (default: 3306)"
2723 set_if = "$mysql_ignore_auth$"
2724 description = "Ignore authentication failure and check for mysql connectivity only"
2727 value = "$mysql_socket$"
2728 description = "Use the specified socket"
2731 value = "$mysql_database$"
2732 description = "Check database with indicated name"
2735 value = "$mysql_file$"
2736 description = "Read from the specified client options file"
2739 value = "$mysql_group$"
2740 description = "Use a client options group"
2743 value = "$mysql_username$"
2744 description = "Connect using the indicated username"
2747 value = "$mysql_password$"
2748 description = "Use the indicated password to authenticate the connection"
2751 set_if = "$mysql_check_slave$"
2752 description = "Check if the slave thread is running properly"
2755 value = "$mysql_warning$"
2756 description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
2759 value = "$mysql_critical$"
2760 description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
2763 set_if = "$mysql_ssl$"
2764 description = "Use ssl encryptation"
2767 value = "$mysql_cacert$"
2768 description = "Path to CA signing the cert"
2771 value = "$mysql_cert$"
2772 description = "Path to SSL certificate"
2775 value = "$mysql_key$"
2776 description = "Path to private SSL key"
2779 value = "$mysql_cadir$"
2780 description = "Path to CA directory"
2783 value = "$mysql_ciphers$"
2784 description = "List of valid SSL ciphers"
2788 vars.mysql_hostname = "$check_address$"
2791 object CheckCommand "negate" {
2792 command = [ PluginDir + "/negate" ]
2795 "-t" = "$negate_timeout$"
2796 "-T" = "$negate_timeout_result$"
2797 "-o" = "$negate_ok$"
2798 "-w" = "$negate_warning$"
2799 "-c" = "$negate_critical$"
2801 set_if = "$negate_substitute$"
2803 "--wrapped-plugin" = {
2805 var command = macro("$negate_command$")
2806 var arguments = macro("$negate_arguments$")
2808 if (typeof(command) == String && !arguments) {
2812 var escaped_args = []
2813 for (arg in resolve_arguments(command, arguments)) {
2814 escaped_args.add(arg)
2816 return escaped_args.join(" ")
2823 vars.negate_timeout_result = "UNKNOWN"
2826 object CheckCommand "file_age" {
2827 command = [ PluginDir + "/check_file_age" ]
2831 value = "$file_age_warning_time$"
2832 description = "File must be no more than this many seconds old (default: 240s)"
2835 value = "$file_age_critical_time$"
2836 description = "File must be no more than this many seconds old (default: 600s)"
2839 value = "$file_age_warning_size$"
2840 description = "File must be at least this many bytes long"
2843 value = "$file_age_critical_size$"
2844 description = "File must be at least this many bytes long (default: 0B)"
2847 set_if = "$file_age_ignoremissing$"
2848 description = "return OK if the file does not exist"
2851 value = "$file_age_file$"
2852 description = "File to monitor"
2856 vars.file_age_ignoremissing = false
2859 object CheckCommand "smart" {
2860 command = [ PluginDir + "/check_ide_smart" ]
2864 value = "$smart_device$"
2865 description = "Name of a local hard drive to monitor"
2871 object CheckCommand "breeze" {
2872 import "ipv4-or-ipv6"
2874 command = [ PluginDir + "/check_breeze" ]
2878 value = "$breeze_hostname$"
2879 description = "Name or IP address of host to check"
2883 value = "$breeze_community$"
2884 description = "SNMPv1 community (default public)"
2887 value = "$breeze_warning$"
2888 description = "Percentage strength below which a WARNING status will result"
2892 value = "$breeze_critical$"
2893 description = "Percentage strength below which a CRITICAL status will result"
2898 vars.breeze_hostname = "$check_address$"
2899 vars.breeze_warning = "50"
2900 vars.breeze_critical = "20"
2903 object CheckCommand "flexlm" {
2904 command = [ PluginDir + "/check_flexlm" ]
2908 value = "$flexlm_licensefile$"
2909 description = "Name of license file (usually license.dat)"
2913 value = "$flexlm_timeout$"
2914 description = "Plugin time out in seconds (default = 15)"
2919 object CheckCommand "game" {
2920 import "ipv4-or-ipv6"
2922 command = [ PluginDir + "/check_game" ]
2926 value = "$game_port$"
2927 description = "Port to connect to"
2930 value = "$game_timeout$"
2931 description = "Seconds before connection times out (default: 10)"
2934 value = "$game_gamefield$"
2935 description = "Field number in raw qstat output that contains game name"
2938 value = "$game_mapfield$"
2939 description = "Field number in raw qstat output that contains map name"
2942 value = "$game_pingfield$"
2943 description = "Field number in raw qstat output that contains ping time"
2946 value = "$game_gametime$"
2947 description = "Field number in raw qstat output that contains game time"
2950 value = "$game_hostname$"
2951 description = "Name of the host running the game"
2954 value = "$game_game$"
2955 description = "Name of the game"
2960 value = "$game_ipaddress$"
2961 description = "Ipaddress of the game server to query"
2968 object CheckCommand "mysql_query" {
2969 import "ipv4-or-ipv6"
2971 command = [ PluginDir + "/check_mysql_query" ]
2974 "-H" = "$mysql_query_hostname$"
2975 "-P" = "$mysql_query_port$"
2976 "-u" = "$mysql_query_username$"
2977 "-p" = "$mysql_query_password$"
2978 "-d" = "$mysql_query_database$"
2979 "-f" = "$mysql_query_file$"
2980 "-g" = "$mysql_query_group$"
2981 "-q" = "$mysql_query_execute$"
2982 "-w" = "$mysql_query_warning$"
2983 "-c" = "$mysql_query_critical$"
2986 vars.mysql_query_hostname = "$check_address$"
2989 object CheckCommand "radius" {
2990 import "ipv4-or-ipv6"
2993 PluginDir + "/check_radius",
2997 "-H" = "$radius_address$",
2998 "-F" = "$radius_config_file$",
2999 "-u" = "$radius_username$",
3000 "-p" = "$radius_password$",
3002 value = "$radius_port$",
3005 value = "$radius_nas_id$",
3006 description = "NAS identifier"
3009 value = "$radius_nas_address$",
3010 description = "NAS IP Address"
3013 value = "$radius_expect$",
3014 description = "Response string to expect from the server"
3017 value = "$radius_retries$",
3018 description = "Number of times to retry a failed connection"
3021 value = "$radius_timeout$",
3022 description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
3026 vars.radius_address = "$check_address$"
3029 object CheckCommand "nscp_api" {
3030 import "ipv4-or-ipv6"
3032 command = [ PluginDir + "/check_nscp_api" ]
3036 value = "$nscp_api_host$"
3037 description = "NSCP API host address"
3041 value = "$nscp_api_port$"
3042 description = "NSCP API host port. Defaults to 8443."
3045 value = "$nscp_api_password$"
3046 description = "NSCP API password"
3049 value = "$nscp_api_query$"
3050 description = "NSCPI API Query endpoint to use"
3053 value = "$nscp_api_arguments$"
3054 description = "NSCP API Query arguments"
3059 vars.nscp_api_host = "$check_address$"