]> granicus.if.org Git - icinga2/blob - itl/command-plugins.conf
177612ab3bb4a6adf0116a6c63e2c87c0c6db1d5
[icinga2] / itl / command-plugins.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 template CheckCommand "ipv4-or-ipv6" {
21         vars.check_address = {{
22                 var addr_v4 = macro("$address$")
23                 var addr_v6 = macro("$address6$")
24
25                 if (addr_v4) {
26                         return addr_v4
27                 } else {
28                         return addr_v6
29                 }
30         }}
31 }
32
33 template CheckCommand "ping-common" {
34         import "plugin-check-command"
35
36         command = [ PluginDir + "/check_ping" ]
37
38         arguments = {
39                 "-H" = "$ping_address$"
40                 "-w" = "$ping_wrta$,$ping_wpl$%"
41                 "-c" = "$ping_crta$,$ping_cpl$%"
42                 "-p" = "$ping_packets$"
43                 "-t" = "$ping_timeout$"
44         }
45
46         vars.ping_wrta = 100
47         vars.ping_wpl = 5
48         vars.ping_crta = 200
49         vars.ping_cpl = 15
50 }
51
52 object CheckCommand "ping" {
53         import "ping-common"
54         import "ipv4-or-ipv6"
55
56         vars.ping_address = "$check_address$"
57 }
58
59 object CheckCommand "ping4" {
60         import "ping-common"
61
62         command += [ "-4" ]
63
64         vars.ping_address = "$address$"
65 }
66
67 object CheckCommand "ping6" {
68         import "ping-common"
69
70         command += [ "-6" ]
71
72         vars.ping_address = "$address6$"
73 }
74
75 template CheckCommand "hostalive-common" {
76         vars.ping_wrta = 3000.0
77         vars.ping_wpl = 80
78
79         vars.ping_crta = 5000.0
80         vars.ping_cpl = 100
81 }
82
83 object CheckCommand "hostalive" {
84         import "ping"
85         import "hostalive-common"
86 }
87
88 object CheckCommand "hostalive4" {
89         import "ping4"
90         import "hostalive-common"
91 }
92
93 object CheckCommand "hostalive6" {
94         import "ping6"
95         import "hostalive-common"
96 }
97
98 template CheckCommand "fping-common" {
99         import "plugin-check-command"
100
101         command = [
102                 PluginDir + "/check_fping",
103                 "$fping_address$"
104         ]
105
106         arguments = {
107                 "-w" = "$fping_wrta$,$fping_wpl$%"
108                 "-c" = "$fping_crta$,$fping_cpl$%"
109                 "-n" = "$fping_number$"
110                 "-i" = "$fping_interval$"
111                 "-b" = "$fping_bytes$"
112                 "-T" = "$fping_target_timeout$"
113                 "-S" = "$fping_source_ip$"
114                 "-I" = "$fping_source_interface$"
115         }
116
117         vars.fping_wrta = 100
118         vars.fping_wpl = 5
119         vars.fping_crta = 200
120         vars.fping_cpl = 15
121         vars.fping_number = 5
122         vars.fping_interval = 500
123 }
124
125 object CheckCommand "fping4" {
126         import "fping-common"
127
128         command += [ "-4" ]
129
130         vars.fping_address = "$address$"
131 }
132
133 object CheckCommand "fping6" {
134         import "fping-common"
135
136         command += [ "-6" ]
137
138         vars.fping_address = "$address6$"
139 }
140
141 object CheckCommand "dummy" {
142         import "plugin-check-command"
143
144         command = [
145                 PluginDir + "/check_dummy",
146                 "$dummy_state$",
147                 "$dummy_text$"
148         ]
149
150         vars.dummy_state = 0
151         vars.dummy_text = "Check was successful."
152 }
153
154 object CheckCommand "passive" {
155         import "dummy"
156
157         vars.dummy_state = 3
158         vars.dummy_text = "No Passive Check Result Received."
159 }
160
161 object CheckCommand "tcp" {
162         import "plugin-check-command"
163         import "ipv4-or-ipv6"
164
165         command = [ PluginDir + "/check_tcp" ]
166
167         arguments = {
168                 "-H" = {
169                         value =  "$tcp_address$"
170                         description = "Host name, IP Address, or unix socket (must be an absolute path)."
171                 }
172                 "-p" = {
173                         value =  "$tcp_port$"
174                         description = "The TCP port number."
175                 }
176                 "-e" = {
177                         value = "$tcp_expect$"
178                         description = "String to expect in server response (may be repeated)."
179                 }
180                 "-A" = {
181                         set_if = "$tcp_all$"
182                         description = "All expect strings need to occur in server response. Defaults to false."
183                 }
184                 "-E_send" = {
185                         key = "-E"
186                         order = 1
187                         set_if = "$tcp_escape_send$"
188                         description = "Enable usage of \n, \r, \t or \\ in send string."
189                 }
190                 "-s" = {
191                         order = 2
192                         value = "$tcp_send$"
193                         description = "String to send to the server."
194                 }
195                 "-E_quit" = {
196                         key = "-E"
197                         order = 3
198                         set_if = "$tcp_escape_quit$"
199                         description = "Enable usage of \n, \r, \t or \\ in quit string."
200                 }
201                 "-q" = {
202                         order = 4
203                         value = "$tcp_quit$"
204                         description = "String to send server to initiate a clean close of the connection."
205                 }
206                 "-r" = {
207                         value = "$tcp_refuse$"
208                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
209                 }
210                 "-M" = {
211                         value = "$tcp_mismatch$"
212                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
213                 }
214                 "-j" = {
215                         set_if = "$tcp_jail$"
216                         description = "Hide output from TCP socket."
217                 }
218                 "-m" = {
219                         value = "$tcp_maxbytes$"
220                         description = "Close connection once more than this number of bytes are received."
221                 }
222                 "-d" = {
223                         value = "$tcp_delay$"
224                         description = "Seconds to wait between sending string and polling for response."
225                 }
226                 "-D" = {
227                         value = "$tcp_certificate$"
228                         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."
229                 }
230                 "-S" = {
231                         set_if = "$tcp_ssl$"
232                         description = "Use SSL for the connection."
233                 }
234                 "-w" = {
235                         value = "$tcp_wtime$"
236                         description = "Response time to result in warning status (seconds)."
237                 }
238                 "-c" = {
239                         value = "$tcp_ctime$"
240                         description = "Response time to result in critical status (seconds)."
241                 }
242                 "-t" = {
243                         value = "$tcp_timeout$"
244                         description = "Seconds before connection times out. Defaults to 10."
245                 }
246         }
247
248         vars.tcp_address = "$check_address$"
249         vars.tcp_all = false
250         vars.tcp_refuse = "crit"
251         vars.tcp_mismatch = "warn"
252         vars.tcp_timeout = 10
253 }
254
255 object CheckCommand "ssl" {
256         import "plugin-check-command"
257         import "ipv4-or-ipv6"
258
259         command = [ PluginDir + "/check_tcp" ]
260
261         arguments = {
262                 "-H" = "$ssl_address$"
263                 "-p" = "$ssl_port$"
264                 "--ssl" = { }
265                 "--timeout" = "$ssl_timeout$"
266                 "-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$"
267         }
268
269         vars.ssl_address = "$check_address$"
270 }
271
272 object CheckCommand "udp" {
273         import "plugin-check-command"
274         import "ipv4-or-ipv6"
275
276         command = [
277                 PluginDir + "/check_udp",
278                 "-H", "$udp_address$",
279                 "-p", "$udp_port$"
280         ]
281
282         arguments = {
283                 "-s" = {
284                         value = "$udp_send$"
285                         required = true
286                 }
287                 "-e" = {
288                         value = "$udp_expect$"
289                         required = true
290                 }
291                 "-q" = "$udp_quit$"
292         }
293
294         vars.udp_address = "$check_address$"
295 }
296
297 object CheckCommand "http" {
298         import "plugin-check-command"
299         import "ipv4-or-ipv6"
300
301         command = [ PluginDir + "/check_http" ]
302
303         arguments = {
304                 "-H" = "$http_vhost$"
305                 "-I" = "$http_address$"
306                 "-u" = "$http_uri$"
307                 "-p" = "$http_port$"
308                 "-S" = {
309                         set_if = "$http_ssl$"
310                 }
311                 "--sni" = {
312                         set_if = "$http_sni$"
313                 }
314                 "-C" = {
315                         value = "$http_certificate$"
316                         description = "Minimum number of days a certificate has to be valid. Port defaults to 443."
317                 }
318                 "-J" = {
319                         value = "$http_clientcert$"
320                         description = "Name of file contains the client certificate (PEM format)"
321                 }
322                 "-K" = {
323                         value = "$http_privatekey$"
324                         description = "Name of file contains the private key (PEM format)"
325                 }
326                 "-a" = {
327                         value = "$http_auth_pair$"
328                         description = "Username:password on sites with basic authentication"
329                 }
330                 "--no-body" = {
331                         set_if = "$http_ignore_body$"
332                 }
333                 "-w" = "$http_warn_time$"
334                 "-c" = "$http_critical_time$"
335                 "-e" = "$http_expect$"
336                 "-d" = {
337                         value = "$http_headerstring$"
338                         description = "String to expect in the response headers"
339                 }
340                 "-s" = {
341                         value = "$http_string$"
342                         description = "String to expect in the content"
343                 }
344                 "-P" = {
345                         value = "$http_post$"
346                         description = "URL encoded http POST data"
347                 }
348                 "-j" = {
349                         value = "$http_method$"
350                         description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
351                 }
352                 "-M" = {
353                         value = "$http_maxage$"
354                         description = "Warn if document is more than seconds old"
355                 }
356                 "-T" = {
357                         value = "$http_contenttype$"
358                         description = "Specify Content-Type header when POSTing"
359                 }
360                 "-l" = {
361                         set_if = "$http_linespan$"
362                         description = "Allow regex to span newline"
363                         order = 1
364                 }
365                 "-r" = {
366                         value = "$http_expect_body_regex$"
367                         description = "Search page for regex"
368                         order = 2
369                 }
370                 "-R" = {
371                         value = "$http_expect_body_eregi$"
372                         description = "Search page for case-insensitive regex"
373                         order = 2
374                 }
375                 "--invert-regex" = {
376                         set_if = "$http_invertregex$"
377                         description = "Return CRITICAL if found, OK if not"
378                 }
379                 "-b" = {
380                         value = "$http_proxy_auth_pair$"
381                         description = "Username:password on proxy-servers with basic authentication"
382                 }
383                 "-A" = {
384                         value = "$http_useragent$"
385                         description = "String to be sent in http header as User Agent"
386                 }
387                 "-k" = {
388                         value = "$http_header$"
389                         description = "Any other tags to be sent in http header"
390                 }
391                 "-E" = {
392                         set_if = "$http_extendedperfdata$"
393                         description = "Print additional perfdata"
394                 }
395                 "-f" = {
396                         value = "$http_onredirect$"
397                         description = "How to handle redirect pages"
398                 }
399                 "-m" = {
400                         value = "$http_pagesize$"
401                         description = "Minim page size required:Maximum page size required"
402                 }
403                 "-t" = {
404                         value = "$http_timeout$"
405                         description = "Seconds before connection times out"
406                 }
407         }
408
409         vars.http_address = "$check_address$"
410         vars.http_ssl = false
411         vars.http_sni = false
412         vars.http_linespan = false
413         vars.http_invertregex = false
414 }
415
416 object CheckCommand "ftp" {
417         import "plugin-check-command"
418         import "ipv4-or-ipv6"
419
420         command = [ PluginDir + "/check_ftp" ]
421
422         arguments = {
423                 "-H" = {
424                         value = "$ftp_address$"
425                         description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
426                 }
427                 "-p" = {
428                         value = "$ftp_port$"
429                         description = "The FTP port number. Defaults to none"
430                 }
431                 "-e" = {
432                         value = "$ftp_expect$"
433                         description = "String to expect in server response (may be repeated)."
434                 }
435                 "-A" = {
436                         set_if = "$ftp_all$"
437                         description = "All expect strings need to occur in server response. Default is any."
438                 }
439                 "-E_send" = {
440                         key = "-E"
441                         order = 1
442                         set_if = "$ftp_escape_send$"
443                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
444                 }
445                 "-s" = {
446                         order = 2
447                         value = "$ftp_send$"
448                         description = "String to send to the server."
449                 }
450                 "-E_quit" = {
451                         key = "-E"
452                         order = 3
453                         set_if = "$ftp_escape_quit$"
454                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
455                 }
456                 "-q" = {
457                         order = 4
458                         value = "$ftp_quit$"
459                         description = "String to send server to initiate a clean close of the connection."
460                 }
461                 "-r" = {
462                         value = "$ftp_refuse$"
463                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
464                 }
465                 "-M" = {
466                         value = "$ftp_mismatch$"
467                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
468                 }
469                 "-j" = {
470                         set_if = "$ftp_jail$"
471                         description = "Hide output from TCP socket."
472                 }
473                 "-m" = {
474                         value = "$ftp_maxbytes$"
475                         description = "Close connection once more than this number of bytes are received."
476                 }
477                 "-d" = {
478                         value = "$ftp_delay$"
479                         description = "Seconds to wait between sending string and polling for response."
480                 }
481                 "-D" = {
482                         value = "$ftp_certificate$"
483                         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."
484                 }
485                 "-S" = {
486                         set_if = "$ftp_ssl$"
487                         description = "Use SSL for the connection."
488                 }
489                 "-w" = {
490                         value = "$ftp_wtime$"
491                         description = "Response time to result in warning status (seconds)."
492                 }
493                 "-c" = {
494                         value = "$ftp_ctime$"
495                         description = "Response time to result in critical status (seconds)."
496                 }
497                 "-t" = {
498                         value = "$ftp_timeout$"
499                         description = "Seconds before connection times out. Defaults to 10."
500                 }
501         }
502
503         vars.ftp_address = "$check_address$"
504         vars.ftp_ssl = false
505         vars.ftp_refuse = "crit"
506         vars.ftp_mismatch = "warn"
507         vars.ftp_timeout = 10
508 }
509
510 object CheckCommand "smtp" {
511         import "plugin-check-command"
512         import "ipv4-or-ipv6"
513
514         command = [ PluginDir + "/check_smtp" ]
515
516         arguments = {
517                 "-H" = "$smtp_address$"
518                 "-p" = "$smtp_port$"
519                 "-f" = "$smtp_mail_from$"
520                 "-e" = "$smtp_expect$"
521                 "-C" = "$smtp_command$"
522                 "-R" = "$smtp_response$"
523                 "-F" = "$smtp_helo_fqdn$"
524                 "-D" = "$smtp_certificate_age$"
525                 "-S" = "$smtp_starttls$"
526                 "-A" = "$smtp_authtype$"
527                 "-U" = "$smtp_authuser$"
528                 "-P" = "$smtp_authpass$"
529                 "-q" = "$smtp_ignore_quit$"
530                 "-w" = "$smtp_warning$"
531                 "-c" = "$smtp_critical$"
532                 "-t" = "$smtp_timeout$"
533         }
534
535         vars.smtp_address = "$check_address$"
536 }
537
538 object CheckCommand "ssmtp" {
539         import "plugin-check-command"
540         import "ipv4-or-ipv6"
541
542         command = [ PluginDir + "/check_ssmtp" ]
543         arguments = {
544                 "-H" = "$ssmtp_address$"
545                 "-p" = "$ssmtp_port$"
546         }
547
548         vars.ssmtp_address = "$check_address$"
549 }
550
551 object CheckCommand "imap" {
552         import "plugin-check-command"
553         import "ipv4-or-ipv6"
554
555         command = [ PluginDir + "/check_imap" ]
556
557         arguments = {
558                 "-H" = "$imap_address$"
559                 "-p" = "$imap_port$"
560         }
561
562         vars.imap_address = "$check_address$"
563 }
564
565 object CheckCommand "simap" {
566         import "plugin-check-command"
567         import "ipv4-or-ipv6"
568
569           command = [ PluginDir + "/check_simap" ]
570
571         arguments = {
572                 "-H" = "$simap_address$"
573                 "-p" = "$simap_port$"
574         }
575
576         vars.simap_address = "$check_address$"
577 }
578
579 object CheckCommand "pop" {
580         import "plugin-check-command"
581         import "ipv4-or-ipv6"
582
583         command = [ PluginDir + "/check_pop" ]
584
585         arguments = {
586                 "-H" = "$pop_address$"
587                 "-p" = "$pop_port$"
588         }
589
590         vars.pop_address = "$check_address$"
591 }
592
593 object CheckCommand "spop" {
594         import "plugin-check-command"
595         import "ipv4-or-ipv6"
596
597         command = [ PluginDir + "/check_spop" ]
598
599         arguments = {
600                 "-H" = "$spop_address$"
601                 "-p" = "$spop_port$"
602         }
603
604         vars.spop_address = "$check_address$"
605 }
606
607 object CheckCommand "ntp_time" {
608         import "plugin-check-command"
609         import "ipv4-or-ipv6"
610
611         command = [ PluginDir + "/check_ntp_time" ]
612
613         arguments = {
614                 "-H" = "$ntp_address$"
615                 "-p" = "$ntp_port$"
616                 "-q" = "$ntp_quit$"
617                 "-w" = "$ntp_warning$"
618                 "-c" = "$ntp_critical$"
619                 "-o" = "$ntp_timeoffset$"
620                 "-t" = "$ntp_timeout$"
621         }
622
623         vars.ntp_address = "$check_address$"
624 }
625
626 object CheckCommand "ntp_peer" {
627         import "plugin-check-command"
628         import "ipv4-or-ipv6"
629
630         command = [ PluginDir + "/check_ntp_peer" ]
631
632         arguments = {
633                 "-H" = "$ntp_address$"
634                 "-p" = "$ntp_port$"
635                 "-w" = "$ntp_warning$"
636                 "-c" = "$ntp_critical$"
637                 "-W" = "$ntp_wstratum$"
638                 "-C" = "$ntp_cstratum$"
639                 "-j" = "$ntp_wjitter$"
640                 "-k" = "$ntp_cjitter$"
641                 "-m" = "$ntp_wsource$"
642                 "-n" = "$ntp_csource$"
643                 "-t" = "$ntp_timeout$"
644         }
645
646         vars.ntp_address = "$check_address$"
647 }
648
649 object CheckCommand "ssh" {
650         import "plugin-check-command"
651         import "ipv4-or-ipv6"
652
653         command = [ PluginDir + "/check_ssh" ]
654
655         arguments = {
656                 "-p" = "$ssh_port$"
657                 "-t" = "$ssh_timeout$"
658                 "host" = {
659                         value = "$ssh_address$"
660                         skip_key = true
661                         order = 1
662                 }
663         }
664
665         vars.ssh_address = "$check_address$"
666 }
667
668 object CheckCommand "disk" {
669         import "plugin-check-command"
670
671         command = [ PluginDir + "/check_disk" ]
672
673         arguments = {
674                 "-w" = {
675                         value = "$disk_wfree$"
676                         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"
677                         required = true
678                         order = -3
679                 }
680
681                 "-c" = {
682                         value = "$disk_cfree$"
683                         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"
684                         required = true
685                         order = -3
686                 }
687
688                 "-W" = {
689                         value = "$disk_inode_wfree$"
690                         description = "Exit with WARNING status if less than PERCENT of inode space is free"
691                 }
692
693                 "-K" = {
694                         value = "$disk_inode_cfree$"
695                         description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
696                 }
697
698                 "-p" = {
699                         value = "$disk_partitions$"
700                         description = "Path or partition (may be repeated)"
701                         repeat_key = true
702                         order = 1
703                 }
704
705                 "-p_old" = {
706                         key = "-p"
707                         value = "$disk_partition$"
708                         order = 1
709                 }
710
711                 "-x" = {
712                         value = "$disk_partitions_excluded$"
713                         description = "Ignore device (only works if -p unspecified)"
714                 }
715
716                 "-x_old" = {
717                         key = "-x"
718                         value = "$disk_partition_excluded$"
719                 }
720
721                 "-C" = {
722                         set_if = "$disk_clear$"
723                         description = "Clear thresholds"
724                 }
725
726                 "-E" = {
727                         set_if = "$disk_exact_match$"
728                         description = "For paths or partitions specified with -p, only check for exact paths"
729                 }
730
731                 "-e" = {
732                         set_if = "$disk_errors_only$"
733                         description = "Display only devices/mountpoints with errors"
734                 }
735
736                 "-g" = {
737                         value = "$disk_group$"
738                         description = "Group paths. Thresholds apply to (free-)space of all partitions together"
739                 }
740
741                 "-k" = {
742                         set_if = "$disk_kilobytes$"
743                         description = "Same as --units kB"
744                 }
745
746                 "-l" = {
747                         set_if = "$disk_local$"
748                         description = " Only check local filesystems"
749                 }
750
751                 "-L" = {
752                         set_if = "$disk_stat_remote_fs$"
753                         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)"
754                 }
755
756                 "-M" = {
757                         set_if = "$disk_mountpoint$"
758                         description = "Display the mountpoint instead of the partition"
759                 }
760
761                 "-m" = {
762                         set_if = "$disk_megabytes$"
763                         description = "Same as --units MB"
764                 }
765
766                 "-A" = {
767                         set_if = "$disk_all$"
768                         description = "Explicitly select all paths. This is equivalent to -R .*"
769                 }
770
771                 "-R" = {
772                         value = "$disk_eregi_path$"
773                         description = "Case insensitive regular expression for path/partition (may be repeated)"
774                         repeat_key = true
775                 }
776
777                 "-r" = {
778                         value = "$disk_ereg_path$"
779                         description = "Regular expression for path or partition (may be repeated)"
780                         repeat_key = true
781                 }
782
783                 "-I" = {
784                         value = "$disk_ignore_eregi_path$"
785                         description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
786                         repeat_key = true
787                         order = 2
788                 }
789
790                 "-i" = {
791                         value = "$disk_ignore_ereg_path$"
792                         description = "Regular expression to ignore selected path or partition (may be repeated)"
793                         repeat_key = true
794                         order = 2
795                 }
796
797                 "-t" = {
798                         value = "$disk_timeout$"
799                         description = "Seconds before connection times out (default: 10)"
800                 }
801
802                 "-u" = {
803                         value = "$disk_units$"
804                         description = "Choose bytes, kB, MB, GB, TB (default: MB)"
805                 }
806
807                 "-X" = {
808                         value = "$disk_exclude_type$"
809                         description = "Ignore all filesystems of indicated type (may be repeated)"
810                         repeat_key = true
811                 }
812         }
813
814         vars.disk_wfree = "20%"
815         vars.disk_cfree = "10%"
816         vars.disk_inode_wfree = "20%"
817         vars.disk_inode_cfree = "10%"
818         vars.disk_megabytes = true
819         vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"]
820 }
821
822 object CheckCommand "disk_smb" {
823         import "plugin-check-command"
824
825         command = [ PluginDir + "/check_disk_smb" ]
826
827         arguments = {
828                 "-H" = {
829                         value = "$disk_smb_hostname$"
830                         description = "NetBIOS name of the server."
831                 }
832                 "-s" = {
833                         value = "$disk_smb_share$"
834                         description = "Share name to be tested."
835                 }
836                 "-W" = {
837                         value = "$disk_smb_workgroup$"
838                         description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
839                 }
840                 "-a" = {
841                         value = "$disk_smb_address$"
842                         description = "IP-address of HOST (only necessary if HOST is in another network)."
843                 }
844                 "-u" = {
845                         value = "$disk_smb_username$"
846                         description = "Username to log in to server. (Defaults to 'guest' if omitted)."
847                 }
848                 "-p" = {
849                         value = "$disk_smb_password$"
850                         description = "Password to log in to server. (Defaults to an empty password if omitted)."
851                 }
852                 "-w" = {
853                         value = "$disk_smb_wused$"
854                         description = "Percent of used space at which a warning will be generated (Default: 85%)."
855                 }
856                 "-c" = {
857                         value = "$disk_smb_cused$"
858                         description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
859                 }
860                 "-P" = {
861                         value = "$disk_smb_port$"
862                         description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
863                 }
864         }
865
866         vars.disk_smb_wused = "85%"
867         vars.disk_smb_cused = "95%"
868 }
869
870 object CheckCommand "users" {
871         import "plugin-check-command"
872
873         command = [ PluginDir + "/check_users" ]
874
875         arguments = {
876                 "-w" = "$users_wgreater$"
877                 "-c" = "$users_cgreater$"
878         }
879
880         vars.users_wgreater = 20
881         vars.users_cgreater = 50
882 }
883
884 object CheckCommand "procs" {
885         import "plugin-check-command"
886
887         command = [ PluginDir + "/check_procs" ]
888
889         arguments = {
890                 "-w" = {
891                         value = "$procs_warning$"
892                         description = "Generate warning state if metric is outside this range" 
893                 }
894                 "-c" = {
895                         value = "$procs_critical$"
896                         description = "Generate critical state if metric is outside this range" 
897                 }
898                 "-m" = {
899                         value = "$procs_metric$"
900                         description = "Check thresholds against metric" 
901                 }
902                 "-t" = {
903                         value = "$procs_timeout$"
904                         description = "Seconds before plugin times out"
905                 }
906                 "-T" = {
907                         set_if = "$procs_traditional$"
908                         description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
909                 }
910                 "-s" = {
911                         value = "$procs_state$"
912                         description = "Only scan for processes that have one or more of the status flags you specify"
913                 }
914                 "-p" = {
915                         value = "$procs_ppid$"
916                         description = "Only scan for children of the parent process ID indicated"
917                 }
918                 "-z" = {
919                         value = "$procs_vsz$"
920                         description = "Only scan for processes with VSZ higher than indicated"
921                 }
922                 "-r" = {
923                         value = "$procs_rss$"
924                         description = "Only scan for processes with RSS higher than indicated"
925                 }
926                 "-P" = {
927                         value = "$procs_pcpu$"
928                         description = "Only scan for processes with PCPU higher than indicated"
929                 }
930                 "-u" = {
931                         value = "$procs_user$"
932                         description = "Only scan for processes with user name or ID indicated"
933                 }
934                 "-a" = {
935                         value = "$procs_argument$"
936                         description = "Only scan for processes with args that contain STRING"
937                 }
938                 "--ereg-argument-array" = {
939                         value = "$procs_argument_regex$"
940                         description = "Only scan for processes with args that contain the regex STRING"
941                 }
942                 "-C" = {
943                         value = "$procs_command$"
944                         description = "Only scan for exact matches of COMMAND (without path)"
945                 }
946                 "-k" = {
947                         set_if = "$procs_nokthreads$"
948                         description = "Only scan for non kernel threads"
949                 }
950         }
951
952         vars.procs_traditional = false
953         vars.procs_nokthreads = false
954         vars.procs_warning = 250
955         vars.procs_critical = 400
956 }
957
958 object CheckCommand "swap" {
959         import "plugin-check-command"
960
961         command = [ PluginDir + "/check_swap" ]
962
963         arguments = {
964                 "-w" = "$swap_wfree$%"
965                 "-c" = "$swap_cfree$%"
966         }
967
968         vars.swap_wfree = 50
969         vars.swap_cfree = 25
970 }
971
972 object CheckCommand "load" {
973         import "plugin-check-command"
974
975         command = [ PluginDir + "/check_load" ]
976
977         arguments = {
978                 "-w" = "$load_wload1$,$load_wload5$,$load_wload15$"
979                 "-c" = "$load_cload1$,$load_cload5$,$load_cload15$"
980         }
981
982         vars.load_wload1 = 5.0
983         vars.load_wload5 = 4.0
984         vars.load_wload15 = 3.0
985
986         vars.load_cload1 = 10.0
987         vars.load_cload5 = 6.0
988         vars.load_cload15 = 4.0
989 }
990
991 object CheckCommand "snmp" {
992         import "plugin-check-command"
993
994         command = [ PluginDir + "/check_snmp" ]
995
996         arguments = {
997                 "-H" = "$snmp_address$"
998                 "-o" = "$snmp_oid$"
999                 "-C" = "$snmp_community$"
1000                 "-c" = "$snmp_crit$"
1001                 "-w" = "$snmp_warn$"
1002                 "-s" = "$snmp_string$"
1003                 "-r" = "$snmp_ereg$"
1004                 "-R" = "$snmp_eregi$"
1005                 "-l" = "$snmp_label$"
1006                 "-u" = "$snmp_units$"
1007                 "-t" = "$snmp_timeout$"
1008                 "--invert-search" = {
1009                         set_if = "$snmp_invert_search$"
1010                         description = "Invert search result and return CRITICAL if found"
1011                 }
1012                 "-P" = "$snmp_version$"
1013                 "-m" = "$snmp_miblist$"
1014                 "--rate-multiplier" = "$snmp_rate_multiplier$"
1015                 "--rate" = {
1016                         set_if = "$snmp_rate$"
1017                         description = "Enable rate calculation"
1018                 }
1019                 "-n" = {
1020                         set_if = "$snmp_getnext$"
1021                         description = "Use SNMP GETNEXT instead of SNMP GET"
1022                 }
1023         }
1024
1025         vars.snmp_address = {{
1026                 var addr_v4 = macro("$address$")
1027                 var addr_v6 = macro("$address6$")
1028
1029                 if (addr_v4) {
1030                         return addr_v4
1031                 } else {
1032                         return "udp6:[" + addr_v6 + "]"
1033                 }
1034         }}
1035
1036         vars.snmp_community = "public"
1037         vars.snmp_invert_search = false
1038         vars.snmp_timeout = "10"
1039 }
1040
1041 object CheckCommand "snmpv3" {
1042         import "plugin-check-command"
1043         import "ipv4-or-ipv6"
1044
1045         command = [ PluginDir + "/check_snmp" ]
1046
1047         arguments = {
1048                 "-H" = "$snmpv3_address$"
1049                 "-P" = 3
1050                 "--seclevel" = "$snmpv3_seclevel$"
1051                 "-U" = "$snmpv3_user$"
1052                 "-a" = "$snmpv3_auth_alg$"
1053                 "-A" = "$snmpv3_auth_key$"
1054                 "-x" = "$snmpv3_priv_alg$"
1055                 "-X" = "$snmpv3_priv_key$"
1056                 "-o" = "$snmpv3_oid$"
1057                 "-c" = "$snmpv3_crit$"
1058                 "-w" = "$snmpv3_warn$"
1059                 "-l" = "$snmpv3_label$"
1060         }
1061
1062         vars.snmpv3_address = "$check_address$"
1063         vars.snmpv3_auth_alg = "SHA"
1064         vars.snmpv3_priv_alg = "AES"
1065         vars.snmpv3_seclevel = "authPriv"
1066 }
1067
1068 object CheckCommand "snmp-uptime" {
1069         import "snmp"
1070
1071         vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1072 }
1073
1074 object CheckCommand "apt" {
1075         import "plugin-check-command"
1076
1077         command = [ PluginDir + "/check_apt" ]
1078 }
1079
1080 object CheckCommand "dhcp" {
1081         import "plugin-check-command"
1082
1083         command = [ PluginDir + "/check_dhcp" ]
1084
1085         arguments = {
1086                 "-s" = "$dhcp_serverip$"
1087                 "-r" = "$dhcp_requestedip$"
1088                 "-t" = "$dhcp_timeout$"
1089                 "-i" = "$dhcp_interface$"
1090                 "-m" = "$dhcp_mac$"
1091                 "-u" = {
1092                         set_if = "$dhcp_unicast$"
1093                 }
1094         }
1095
1096         vars.dhcp_unicast = false
1097 }
1098
1099 object CheckCommand "dns" {
1100         import "plugin-check-command"
1101         import "ipv4-or-ipv6"
1102
1103         command = [ PluginDir + "/check_dns" ]
1104
1105         arguments = {
1106                 "-H" = {
1107                         value = "$dns_lookup$"
1108                         description = "The name or address you want to query."
1109                 }
1110                 "-s" = {
1111                         value = "$dns_server$"
1112                         description = "Optional DNS server you want to use for the lookup."
1113                 }
1114                 "-a" = {
1115                         value = "$dns_expected_answers$"
1116                         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)."
1117                 }
1118                 "-a_old" = {
1119                         key = "-a"
1120                         value ="$dns_expected_answer$"
1121                 }
1122                 "-A" = {
1123                         set_if = "$dns_authoritative$"
1124                 }
1125                 "-w" = {
1126                         value = "$dns_wtime$"
1127                         description = "Return warning if elapsed time exceeds value."
1128                 }
1129                 "-c" = {
1130                         value = "$dns_ctime$"
1131                         description = "Return critical if elapsed time exceeds value."
1132                 }
1133                 "-t" = {
1134                         value = "$dns_timeout$"
1135                         description = "Seconds before connection times out. Defaults to 10."
1136                 }
1137         }
1138
1139         vars.dns_lookup = "$host.name$"
1140         vars.dns_expected_answer = "$check_address$"
1141         vars.dns_timeout = 10
1142 }
1143
1144 object CheckCommand "dig" {
1145         import "plugin-check-command"
1146         import "ipv4-or-ipv6"
1147
1148         command = [ PluginDir + "/check_dig" ]
1149
1150         arguments = {
1151                 "-H" = "$dig_server$"
1152                 "-l" = "$dig_lookup$"
1153         }
1154
1155         vars.dig_server = "$check_address$"
1156 }
1157
1158 object CheckCommand "nscp" {
1159         import "plugin-check-command"
1160         import "ipv4-or-ipv6"
1161
1162         command = [ PluginDir + "/check_nt" ]
1163
1164         arguments = {
1165                 "-H" = "$nscp_address$"
1166                 "-p" = "$nscp_port$"
1167                 "-s" = "$nscp_password$"
1168                 "-v" = {
1169                         value = "$nscp_variable$"
1170                         required = true
1171                 }
1172                 "-l" = {
1173                         value = "$nscp_params$"
1174                         repeat_key = false
1175                 }
1176                 "-w" = "$nscp_warn$"
1177                 "-c" = "$nscp_crit$"
1178                 "-t" = "$nscp_timeout$"
1179                 "-d" = {
1180                         value = "SHOWALL"
1181                         description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
1182                         set_if = "$nscp_showall$"
1183                 }
1184         }
1185
1186         vars.nscp_address = "$check_address$"
1187         vars.nscp_port = 12489
1188         vars.nscp_showall = false
1189 }
1190
1191 object CheckCommand "by_ssh" {
1192         import "plugin-check-command"
1193         import "ipv4-or-ipv6"
1194
1195         command = [ PluginDir + "/check_by_ssh" ]
1196
1197         arguments = {
1198                 "-H" = "$by_ssh_address$"
1199                 "-p" = "$by_ssh_port$"
1200                 "-C" = "$by_ssh_command$"
1201                 "-l" = "$by_ssh_logname$"
1202                 "-i" = "$by_ssh_identity$"
1203                 "-q" = {
1204                         set_if = "$by_ssh_quiet$"
1205                 }
1206                 "-w" = "$by_ssh_warn$"
1207                 "-c" = "$by_ssh_crit$"
1208                 "-t" = "$by_ssh_timeout$"
1209         }
1210
1211         vars.by_ssh_address = "$check_address$"
1212         vars.by_ssh_quiet = false
1213 }
1214
1215 object CheckCommand "ups" {
1216         import "plugin-check-command"
1217         import "ipv4-or-ipv6"
1218
1219         command = [ PluginDir + "/check_ups" ]
1220
1221         arguments = {
1222                 "-H" = {
1223                         value = "$ups_address$"
1224                         description = "Address of the upsd server"
1225                         required = true
1226                 }
1227                 "-u" = {
1228                         value = "$ups_name$"
1229                         description = "Name of the UPS to monitor"
1230                         required = true
1231                 }
1232                 "-p" = {
1233                         value = "$ups_port$"
1234                         description = "Port number (default: 3493)"
1235                 }
1236                 "-v" = {
1237                         value = "$ups_variable$"
1238                         description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
1239                 }
1240                 "-w" = {
1241                         value = "$ups_warning$"
1242                         description = "Warning threshold for the selected variable"
1243                 }
1244                 "-c" = {
1245                         value = "$ups_critical$"
1246                         description = "Critical threshold for the selected variable"
1247                 }
1248                 "-T" = {
1249                         set_if = "$ups_celsius$"
1250                         description = "Display temperature in degrees Celsius instead of Fahrenheit"
1251                 }
1252                 "-t" = {
1253                         value = "$ups_timeout$"
1254                         description = "Seconds before the connection times out (default: 10)"
1255                 }
1256         }
1257
1258         vars.ups_address = "$check_address$"
1259         vars.ups_name = "ups"
1260 }
1261
1262 object CheckCommand "nrpe" {
1263         import "plugin-check-command"
1264         import "ipv4-or-ipv6"
1265
1266         command = [ PluginDir + "/check_nrpe" ]
1267
1268         arguments = {
1269                 "-H" = "$nrpe_address$"
1270                 "-p" = "$nrpe_port$"
1271                 "-c" = "$nrpe_command$"
1272                 "-n" = {
1273                         set_if = "$nrpe_no_ssl$"
1274                         description = "Do not use SSL."
1275                 }
1276                 "-u" = {
1277                         set_if = "$nrpe_timeout_unknown$"
1278                         description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
1279                 }
1280                 "-t" = "$nrpe_timeout$"
1281                 "-a" = {
1282                         value = "$nrpe_arguments$"
1283                         repeat_key = false
1284                         order = 1
1285                 }
1286         }
1287
1288         vars.nrpe_address = "$check_address$"
1289         vars.nrpe_no_ssl = false
1290         vars.nrpe_timeout_unknown = false
1291
1292         timeout = 5m
1293 }
1294
1295 object CheckCommand "hpjd" {
1296         import "plugin-check-command"
1297         import "ipv4-or-ipv6"
1298
1299         command = [ PluginDir + "/check_hpjd" ]
1300
1301         arguments = {
1302                 "-H" = "$hpjd_address$"
1303                 "-C" = "$hpjd_community$"
1304                 "-p" = "$hpjd_port$"
1305         }
1306
1307         vars.hpjd_address = "$check_address$"
1308 }
1309
1310 object CheckCommand "icmp" {
1311         import "plugin-check-command"
1312
1313         command = [ PluginDir + "/check_icmp" ]
1314
1315         arguments = {
1316                 "-H" = {
1317                         value = "$icmp_address$"
1318                         repeat_key = false
1319                         order = 1
1320                 }
1321                 "-w" = "$icmp_wrta$,$icmp_wpl$%"
1322                 "-c" = "$icmp_crta$,$icmp_cpl$%"
1323                 "-s" = "$icmp_source$"
1324                 "-n" = "$icmp_packets$"
1325                 "-i" = "$icmp_packet_interval$"
1326                 "-I" = "$icmp_target_interval$"
1327                 "-m" = "$icmp_hosts_alive$"
1328                 "-b" = "$icmp_data_bytes$"
1329                 "-t" = "$icmp_timeout$"
1330         }
1331
1332         vars.icmp_address = "$address$"
1333         vars.icmp_wrta = 100
1334         vars.icmp_wpl = 5
1335         vars.icmp_crta = 200
1336         vars.icmp_cpl = 15
1337 }
1338
1339 object CheckCommand "ldap" {
1340     import "plugin-check-command"
1341     import "ipv4-or-ipv6"
1342
1343         command = [ PluginDir + "/check_ldap" ]
1344
1345         arguments = {
1346                 "-H" = {
1347                         value = "$ldap_address$"
1348                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1349                 }
1350                 "-p" = {
1351                         value = "$ldap_port$"
1352                         description = "Port number (default: 389)"
1353                 }
1354                 "-a" = {
1355                         value = "$ldap_attr$"
1356                         description = "ldap attribute to search (default: \"(objectclass=*)\""
1357                 }
1358                 "-b" = {
1359                         value = "$ldap_base$"
1360                         required = true
1361                         description = "ldap base (eg. ou=my unit, o=my org, c=at"
1362                 }
1363                 "-D" = {
1364                         value = "$ldap_bind$"
1365                         description = "ldap bind DN (if required)"
1366                 }
1367                 "-P" = {
1368                         value = "$ldap_pass$"
1369                         description = "ldap password (if required)"
1370                 }
1371                 "-T" = {
1372                         set_if = "$ldap_starttls$"
1373                         description = "use starttls mechanism introduced in protocol version 3"
1374                 }
1375                 "-S" = {
1376                         set_if = "$ldap_ssl$"
1377                         description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
1378                 }
1379                 "-2" = {
1380                         set_if = "$ldap_v2$"
1381                         description = "Use LDAP protocol version 2"
1382                 }
1383                 "-3" = {
1384                         set_if = "$ldap_v3$"
1385                         description = "Use LDAP protocol version 3"
1386                 }
1387                 "-w" = {
1388                         value = "$ldap_warning$"
1389                         description = "Response time to result in warning status (seconds)"
1390                 }
1391                 "-c" = {
1392                         value = "$ldap_critical$"
1393                         description = "Response time to result in critical status (seconds)"
1394                 }
1395                 "-t" = {
1396                         value = "$ldap_timeout$"
1397                         description = "Seconds before connection times out (default: 10)"
1398                 }
1399                 "-v" = {
1400                         set_if = "$ldap_verbose$"
1401                         description = "Show details for command-line debugging"
1402                 }
1403         }
1404
1405         vars.ldap_address = "$check_address$"
1406         vars.ldap_v2 = true
1407         vars.ldap_v3 = false
1408         vars.ldap_timeout = 10s
1409         vars.ldap_verbose = false
1410 }
1411
1412 /* Contrib plugins */
1413 object CheckCommand "running_kernel" {
1414         import "plugin-check-command"
1415
1416         command = [ "sudo", PluginDir + "/check_running_kernel" ]
1417 }
1418