summaryrefslogtreecommitdiffstats
path: root/itl/command-plugins.conf
blob: 9dd1fc61075d4230abe997e25b8c08422c5b7983 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */

template CheckCommand "ipv4-or-ipv6" {
	vars.check_address = {{
		var addr_v4 = macro("$address$")
		var addr_v6 = macro("$address6$")

		if (addr_v4 && !macro("$check_ipv6$") || macro("$check_ipv4$")) {
			return addr_v4
		} else {
			return addr_v6
		}
	}}

	vars.check_ipv4 = false
	vars.check_ipv6 = false
}

template CheckCommand "ping-common" {
	command = [ PluginDir + "/check_ping" ]

	arguments = {
		"-H" = {
			value = "$ping_address$"
			description = "host to ping"
		}
		"-w" = {
			value = "$ping_wrta$,$ping_wpl$%"
			description = "warning threshold pair"
		}
		"-c" = {
			value = "$ping_crta$,$ping_cpl$%"
			description = "critical threshold pair"
		}
		"-p" = {
			value = "$ping_packets$"
			description = "number of ICMP ECHO packets to send (Default: 5)"
		}
		"-t" = {
			value = "$ping_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
	}

	vars.ping_wrta = 100
	vars.ping_wpl = 5
	vars.ping_crta = 200
	vars.ping_cpl = 15
}

object CheckCommand "ping" {
	import "ping-common"
	import "ipv4-or-ipv6"

	vars.ping_address = "$check_address$"
}

object CheckCommand "ping4" {
	import "ping-common"

	command += [ "-4" ]

	vars.ping_address = "$address$"
}

object CheckCommand "ping6" {
	import "ping-common"

	command += [ "-6" ]

	vars.ping_address = "$address6$"
}

template CheckCommand "hostalive-common" {
	vars.ping_wrta = 3000.0
	vars.ping_wpl = 80

	vars.ping_crta = 5000.0
	vars.ping_cpl = 100
}

object CheckCommand "hostalive" {
	import "ping"
	import "hostalive-common"
}

object CheckCommand "hostalive4" {
	import "ping4"
	import "hostalive-common"
}

object CheckCommand "hostalive6" {
	import "ping6"
	import "hostalive-common"
}

template CheckCommand "fping-common" {
	command = [
		PluginDir + "/check_fping",
		"$fping_address$"
	]

	arguments = {
		"-w" = {
			value = "$fping_wrta$,$fping_wpl$%"
			description = "warning threshold pair"
		}
		"-c" = {
			value = "$fping_crta$,$fping_cpl$%"
			description = "critical threshold pair"
		}
		"-n" = {
			value = "$fping_number$"
			description = "number of ICMP packets to send (default: 1)"
		}
		"-i" = {
			value = "$fping_interval$"
			description = "Interval (ms) between sending packets (default: fping's default for -p)"
		}
		"-b" = {
			value = "$fping_bytes$"
			description = "size of ICMP packet (default: 56)"
		}
		"-T" = {
			value = "$fping_target_timeout$"
			description = "Target timeout (ms) (default: fping's default for -t)"
		}
		"-S" = {
			value = "$fping_source_ip$"
			description = "name or IP Address of sourceip"
		}
		"-I" = {
			value = "$fping_source_interface$"
			description = "source interface name"
		}
	}

	vars.fping_wrta = 100
	vars.fping_wpl = 5
	vars.fping_crta = 200
	vars.fping_cpl = 15
	vars.fping_number = 5
	vars.fping_interval = 500
}

object CheckCommand "fping4" {
	import "fping-common"

	command += [ "-4" ]

	vars.fping_address = "$address$"
}

object CheckCommand "fping6" {
	import "fping-common"

	command += [ "-6" ]

	vars.fping_address = "$address6$"
}

object CheckCommand "tcp" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_tcp" ]

	arguments = {
		"-H" = {
			value =  "$tcp_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)."
		}
		"-p" = {
			value =  "$tcp_port$"
			description = "The TCP port number."
		}
		"-e" = {
			value = "$tcp_expect$"
			description = "String to expect in server response (may be repeated)."
		}
		"-A" = {
			set_if = "$tcp_all$"
			description = "All expect strings need to occur in server response. Defaults to false."
		}
		"-E_send" = {
			key = "-E"
			order = 1
			set_if = "$tcp_escape_send$"
			description = "Enable usage of \n, \r, \t or \\ in send string."
		}
		"-s" = {
			order = 2
			value = "$tcp_send$"
			description = "String to send to the server."
		}
		"-E_quit" = {
			key = "-E"
			order = 3
			set_if = "$tcp_escape_quit$"
			description = "Enable usage of \n, \r, \t or \\ in quit string."
		}
		"-q" = {
			order = 4
			value = "$tcp_quit$"
			description = "String to send server to initiate a clean close of the connection."
		}
		"-r" = {
			value = "$tcp_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
		}
		"-M" = {
			value = "$tcp_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
		}
		"-j" = {
			set_if = "$tcp_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$tcp_maxbytes$"
			description = "Close connection once more than this number of bytes are received."
		}
		"-d" = {
			value = "$tcp_delay$"
			description = "Seconds to wait between sending string and polling for response."
		}
		"-D" = {
			value = "$tcp_certificate$"
			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."
		}
		"-S" = {
			set_if = "$tcp_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$tcp_wtime$"
			description = "Response time to result in warning status (seconds)."
		}
		"-c" = {
			value = "$tcp_ctime$"
			description = "Response time to result in critical status (seconds)."
		}
		"-t" = {
			value = "$tcp_timeout$"
			description = "Seconds before connection times out. Defaults to 10."
		}
		"-4" = {
			set_if = "$tcp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$tcp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.tcp_address = "$check_address$"
	vars.tcp_all = false
	vars.tcp_refuse = "crit"
	vars.tcp_mismatch = "warn"
	vars.tcp_timeout = 10
	vars.check_ipv4 = "$tcp_ipv4$"
	vars.check_ipv6 = "$tcp_ipv6$"
}

object CheckCommand "ssl" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_tcp" ]

	arguments = {
		"-H" = {
			value = "$ssl_address$"
			description = "Host address"
		}
		"-p" = {
			value = "$ssl_port$"
			description ="TCP port (default: 443)"
		}
		"--ssl" = {
			description = "Use SSL for the connection"
		}
		"-t" = {
			value = "$ssl_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-D" = {{
			var days_warn = macro("$ssl_cert_valid_days_warn$")
			var days_critical = macro("$ssl_cert_valid_days_critical$")
			if (days_warn) {
				if (days_critical) {
					return days_warn + "," + days_critical
				} else {
					return days_warn
				}
			}
		}}
		"--sni" = {
			value = "$ssl_sni$"
			description = "Enable SSL/TLS hostname extension support (SNI)"
		}
	}

	vars.ssl_address = "$check_address$"
	vars.ssl_port = 443
	vars.ssl_cert_valid_days_warn = false
	vars.ssl_cert_valid_days_critical = false
}


object CheckCommand "udp" {
	import "ipv4-or-ipv6"

	command = [
		PluginDir + "/check_udp",
		"-H", "$udp_address$",
		"-p", "$udp_port$"
	]

	arguments = {
		"-s" = {
			value = "$udp_send$"
			required = true
			description = "String to send to the server"
		}
		"-e" = {
			value = "$udp_expect$"
			required = true
			description = " String to expect in server response"
		}
		"-q" = {
			value = "$udp_quit$"
			description = "String to send server to initiate a clean close of the connection"
		}
		"-4" = {
			set_if = "$udp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$udp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.udp_address = "$check_address$"
	vars.check_ipv4 = "$udp_ipv4$"
	vars.check_ipv6 = "$udp_ipv6$"
}

object CheckCommand "http" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_http" ]

	arguments = {
		"-H" = {
			value = "$http_vhost$"
			description = "Host name argument for servers using host headers (virtual host)"
		}
		"-I" = {
			set_if = {{ string(macro("$http_address$")) != "" }}
			value = "$http_address$"
			description = "IP address or name (use numeric address if possible to bypass DNS lookup)"
		}
		"-u" = {
			value = "$http_uri$"
			description = "URL to GET or POST (default: /)"
		}
		"-p" = {
			value = "$http_port$"
			description = "Port number (default: 80)"
		}
		"-S" = {
			set_if = "$http_ssl$"
			description = "Connect via SSL"
		}
		"-S1" = {
			set_if = "$http_ssl_force_tlsv1$"
			description = "Connect via SSL version TLSv1"
		}
		"-S1.1" = {
			set_if = "$http_ssl_force_tlsv1_1$"
			description = "Connect via SSL version TLSv1.1"
		}
		"-S1.2" = {
			set_if = "$http_ssl_force_tlsv1_2$"
			description = "Connect via SSL version TLSv1.2"
		}
		"-S2" = {
			set_if = "$http_ssl_force_sslv2$"
			description = "Connect via SSL version SSLv2"
		}
		"-S3" = {
			set_if = "$http_ssl_force_sslv3$"
			description = "Connect via SSL version SSLv3"
		}
		"-S1+" = {
			set_if = "$http_ssl_force_tlsv1_or_higher$"
			description = "Connect via SSL version TLSv1 and newer"
		}
		"-S1.1+" = {
			set_if = "$http_ssl_force_tlsv1_1_or_higher$"
			description = "Connect via SSL version TLSv1.1 and newer"
		}
		"-S1.2+" = {
			set_if = "$http_ssl_force_tlsv1_2_or_higher$"
			description = "Connect via SSL version TLSv1.2 and newer"
		}
		"-S2+" = {
			set_if = "$http_ssl_force_sslv2_or_higher$"
			description = "Connect via SSL version SSLv2 and newer"
		}
		"-S3+" = {
			set_if = "$http_ssl_force_sslv3_or_higher$"
			description = "Connect via SSL version SSLv3 and newer"
		}
		"--sni" = {
			set_if = "$http_sni$"
			description = "Enable SSL/TLS hostname extension support (SNI)"
		}
		"-C" = {
			value = "$http_certificate$"
			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."
		}
		"-J" = {
			value = "$http_clientcert$"
			description = "Name of file contains the client certificate (PEM format)"
		}
		"-K" = {
			value = "$http_privatekey$"
			description = "Name of file contains the private key (PEM format)"
		}
		"-a" = {
			value = "$http_auth_pair$"
			description = "Username:password on sites with basic authentication"
		}
		"--no-body" = {
			set_if = "$http_ignore_body$"
			description = "Don't wait for document body: stop reading after headers"
		}
		"-w" = {
			value = "$http_warn_time$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$http_critical_time$"
			description = "Response time to result in critical status (seconds)"
		}
		"-e" = {
			value = "$http_expect$"
			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.)"
		}
		"-d" = {
			value = "$http_headerstring$"
			description = "String to expect in the response headers"
		}
		"-s" = {
			value = "$http_string$"
			description = "String to expect in the content"
		}
		"-P" = {
			value = "$http_post$"
			description = "URL encoded http POST data"
		}
		"-j" = {
			value = "$http_method$"
			description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
		}
		"-M" = {
			value = "$http_maxage$"
			description = "Warn if document is more than seconds old"
		}
		"-T" = {
			value = "$http_contenttype$"
			description = "Specify Content-Type header when POSTing"
		}
		"-l" = {
			set_if = "$http_linespan$"
			description = "Allow regex to span newline"
			order = 1
		}
		"-r" = {
			value = "$http_expect_body_regex$"
			description = "Search page for regex"
			order = 2
		}
		"-R" = {
			value = "$http_expect_body_eregi$"
			description = "Search page for case-insensitive regex"
			order = 2
		}
		"--invert-regex" = {
			set_if = "$http_invertregex$"
			description = "Return CRITICAL if found, OK if not"
		}
		"-b" = {
			value = "$http_proxy_auth_pair$"
			description = "Username:password on proxy-servers with basic authentication"
		}
		"-A" = {
			value = "$http_useragent$"
			description = "String to be sent in http header as User Agent"
		}
		"-k" = {
			value = "$http_header$"
			description = "Any other tags to be sent in http header"
		}
		"-E" = {
			set_if = "$http_extendedperfdata$"
			description = "Print additional perfdata"
		}
		"-f" = {
			value = "$http_onredirect$"
			description = "How to handle redirect pages"
		}
		"-m" = {
			value = "$http_pagesize$"
			description = "Minim page size required:Maximum page size required"
		}
		"-t" = {
			value = "$http_timeout$"
			description = "Seconds before connection times out"
		}
		"-4" = {
			set_if = "$http_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$http_ipv6$"
			description = "Use IPv6 connection"
		}
		"-L" = {
			set_if = "$http_link$"
			description = "Wrap output in HTML link"
		}
		"-v" = {
			set_if = "$http_verbose$"
			description = "Show details for command-line debugging"
		}
	}

	vars.http_address = "$check_address$"
	vars.http_ssl = false
	vars.http_sni = false
	vars.http_linespan = false
	vars.http_invertregex = false
	vars.check_ipv4 = "$http_ipv4$"
	vars.check_ipv6 = "$http_ipv6$"
	vars.http_link = false
	vars.http_verbose = false
}

object CheckCommand "ftp" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ftp" ]

	arguments = {
		"-H" = {
			value = "$ftp_address$"
			description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
		}
		"-p" = {
			value = "$ftp_port$"
			description = "The FTP port number. Defaults to none"
		}
		"-e" = {
			value = "$ftp_expect$"
			description = "String to expect in server response (may be repeated)."
		}
		"-A" = {
			set_if = "$ftp_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-E_send" = {
			key = "-E"
			order = 1
			set_if = "$ftp_escape_send$"
			description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
		}
		"-s" = {
			order = 2
			value = "$ftp_send$"
			description = "String to send to the server."
		}
		"-E_quit" = {
			key = "-E"
			order = 3
			set_if = "$ftp_escape_quit$"
			description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
		}
		"-q" = {
			order = 4
			value = "$ftp_quit$"
			description = "String to send server to initiate a clean close of the connection."
		}
		"-r" = {
			value = "$ftp_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
		}
		"-M" = {
			value = "$ftp_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
		}
		"-j" = {
			set_if = "$ftp_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$ftp_maxbytes$"
			description = "Close connection once more than this number of bytes are received."
		}
		"-d" = {
			value = "$ftp_delay$"
			description = "Seconds to wait between sending string and polling for response."
		}
		"-D" = {
			value = "$ftp_certificate$"
			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."
		}
		"-S" = {
			set_if = "$ftp_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$ftp_wtime$"
			description = "Response time to result in warning status (seconds)."
		}
		"-c" = {
			value = "$ftp_ctime$"
			description = "Response time to result in critical status (seconds)."
		}
		"-t" = {
			value = "$ftp_timeout$"
			description = "Seconds before connection times out. Defaults to 10."
		}
		"-4" = {
			set_if = "$ftp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$ftp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.ftp_address = "$check_address$"
	vars.ftp_ssl = false
	vars.ftp_refuse = "crit"
	vars.ftp_mismatch = "warn"
	vars.ftp_timeout = 10
	vars.check_ipv4 = "$ftp_ipv4$"
	vars.check_ipv6 = "$ftp_ipv6$"
}

object CheckCommand "smtp" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_smtp" ]

	arguments = {
		"-H" = {
			value = "$smtp_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$smtp_port$"
			description = "Port number (default: 25)"
		}
		"-f" = {
			value = "$smtp_mail_from$"
			description = "FROM-address to include in MAIL command, required by Exchange 2000"
		}
		"-e" = {
			value = "$smtp_expect$"
			description = "String to expect in first line of server response (default: '220')"
		}
		"-C" = {
			value = "$smtp_command$"
			description = "SMTP command"
		}
		"-R" = {
			value = "$smtp_response$"
			description = "Expected response to command (may be used repeatedly)"
		}
		"-F" = {
			value = "$smtp_helo_fqdn$"
			description = "FQDN used for HELO"
		}
		"-D" = {
			value = "$smtp_certificate_age$"
			description = "Minimum number of days a certificate has to be valid"
		}
		"-S" = {
			set_if = "$smtp_starttls$"
			description = "Use STARTTLS for the connection."
		}
		"-A" = {
			value = "$smtp_authtype$"
			description = "SMTP AUTH type to check (default none, only LOGIN supported)"
		}
		"-U" = {
			value = "$smtp_authuser$"
			description = "SMTP AUTH username"
		}
		"-P" = {
			value = "$smtp_authpass$"
			description = "SMTP AUTH password"
		}
		"-q" = {
			value = "$smtp_ignore_quit$"
			description = "Ignore failure when sending QUIT command to server"
		}
		"-w" = {
			value = "$smtp_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$smtp_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$smtp_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$smtp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$smtp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.smtp_address = "$check_address$"
	vars.check_ipv4 = "$smtp_ipv4$"
	vars.check_ipv6 = "$smtp_ipv6$"
}

object CheckCommand "ssmtp" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ssmtp" ]

	arguments = {
		"-H" = {
			value = "$ssmtp_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$ssmtp_port$"
			description = "Port number (default: none)"
		}
		"-E" = {
			value = "$ssmtp_escape$"
			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"
		}
		"-s" = {
			value = "$ssmtp_send$"
			description = "String to send to the server"
		}
		"-e" = {
			value = "$ssmtp_expect$"
			description = "String to expect in server response (may be repeated)"
		}
		"-A" = {
			set_if = "$ssmtp_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-q" = {
			value = "$ssmtp_quit$"
			description = "String to send server to initiate a clean close of the connection"
		}
		"-r" = {
			value = "$ssmtp_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
		}
		"-M" = {
			value = "$ssmtp_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
		}
		"-j" = {
			set_if = "$ssmtp_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$ssmtp_maxbytes$"
			description = "Close connection once more than this number of bytes are received"
		}
		"-d" = {
			value = "$ssmtp_delay$"
			description = "Seconds to wait between sending string and polling for response"
		}
		"-D" = {
			value = "$ssmtp_certificate_age$"
			description = "Minimum number of days a certificate has to be valid"
		}
		"-S" = {
			set_if = "$ssmtp_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$ssmtp_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$ssmtp_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$ssmtp_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$ssmtp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$ssmtp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.ssmtp_address = "$check_address$"
	vars.check_ipv4 = "$ssmtp_ipv4$"
	vars.check_ipv6 = "$ssmtp_ipv6$"
}

object CheckCommand "imap" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_imap" ]

	arguments = {
		"-H" = {
			value = "$imap_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$imap_port$"
			description = "Port number (default: none)"
		}
		"-E" = {
			value = "$imap_escape$"
			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"
		}
		"-s" = {
			value = "$imap_send$"
			description = "String to send to the server"
		}
		"-e" = {
			value = "$imap_expect$"
			description = "String to expect in server response (may be repeated)"
		}
		"-A" = {
			set_if = "$imap_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-q" = {
			value = "$imap_quit$"
			description = "String to send server to initiate a clean close of the connection"
		}
		"-r" = {
			value = "$imap_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
		}
		"-M" = {
			value = "$imap_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
		}
		"-j" = {
			set_if = "$imap_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$imap_maxbytes$"
			description = "Close connection once more than this number of bytes are received"
		}
		"-d" = {
			value = "$imap_delay$"
			description = "Seconds to wait between sending string and polling for response"
		}
		"-D" = {
			value = "$imap_certificate_age$"
			description = "Minimum number of days a certificate has to be valid"
		}
		"-S" = {
			set_if = "$imap_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$imap_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$imap_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$imap_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$imap_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$imap_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.imap_address = "$check_address$"
	vars.check_ipv4 = "$imap_ipv4$"
	vars.check_ipv6 = "$imap_ipv6$"
}

object CheckCommand "simap" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_simap" ]

	arguments = {
		"-H" = {
			value = "$simap_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$simap_port$"
			description = "Port number (default: none)"
		}
		"-E" = {
			value = "$simap_escape$"
			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"
		}
		"-s" = {
			value = "$simap_send$"
			description = "String to send to the server"
		}
		"-e" = {
			value = "$simap_expect$"
			description = "String to expect in server response (may be repeated)"
		}
		"-A" = {
			set_if = "$simap_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-q" = {
			value = "$simap_quit$"
			description = "String to send server to initiate a clean close of the connection"
		}
		"-r" = {
			value = "$simap_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
		}
		"-M" = {
			value = "$simap_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
			}
		"-j" = {
			set_if = "$simap_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$simap_maxbytes$"
			description = "Close connection once more than this number of bytes are received"
		}
		"-d" = {
			value = "$simap_delay$"
			description = "Seconds to wait between sending string and polling for response"
		}
		"-D" = {
			value = "$simap_certificate_age$"
			description = "Minimum number of days a certificate has to be valid"
		}
		"-S" = {
			set_if = "$simap_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$simap_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$simap_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$simap_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$simap_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$simap_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.simap_address = "$check_address$"
	vars.check_ipv4 = "$simap_ipv4$"
	vars.check_ipv6 = "$simap_ipv6$"
}

object CheckCommand "pop" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_pop" ]

	arguments = {
		"-H" = {
			value = "$pop_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$pop_port$"
			description = "Port number (default: none)"
		}
		"-E" = {
			value = "$pop_escape$"
			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"
		}
		"-s" = {
			value = "$pop_send$"
			description = "String to send to the server"
		}
		"-e" = {
			value = "$pop_expect$"
			description = "String to expect in server response (may be repeated)"
		}
		"-A" = {
			set_if = "$pop_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-q" = {
			value = "$pop_quit$"
			description = "String to send server to initiate a clean close of the connection"
		}
		"-r" = {
			value = "$pop_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
		}
		"-M" = {
			value = "$pop_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
		}
		"-j" = {
			set_if = "$pop_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$pop_maxbytes$"
			description = "Close connection once more than this number of bytes are received"
		}
		"-d" = {
			value = "$pop_delay$"
			description = "Seconds to wait between sending string and polling for response"
		}
		"-D" = {
			value = "$pop_certificate_age$"
			description = "Minimum number of days a certificate has to be valid"
		}
		"-S" = {
			set_if = "$pop_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$pop_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$pop_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$pop_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$pop_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$pop_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.pop_address = "$check_address$"
	vars.check_ipv4 = "$pop_ipv4$"
	vars.check_ipv6 = "$pop_ipv6$"
}

object CheckCommand "spop" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_spop" ]

	arguments = {
		"-H" = {
			value = "$spop_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$spop_port$"
			description = "Port number (default: none)"
		}
		"-E" = {
			value = "$spop_escape$"
			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"
		}
		"-s" = {
			value = "$spop_send$"
			description = "String to send to the server"
		}
		"-e" = {
			value = "$spop_expect$"
			description = "String to expect in server response (may be repeated)"
		}
		"-A" = {
			set_if = "$spop_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-q" = {
			value = "$spop_quit$"
			description = "String to send server to initiate a clean close of the connection"
		}
		"-r" = {
			value = "$spop_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
		}
		"-M" = {
			value = "$spop_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
		}
		"-j" = {
			set_if = "$spop_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$spop_maxbytes$"
			description = "Close connection once more than this number of bytes are received"
		}
		"-d" = {
			value = "$spop_delay$"
			description = "Seconds to wait between sending string and polling for response"
		}
		"-D" = {
			value = "$spop_certificate_age$"
			description = "Minimum number of days a certificate has to be valid"
		}
		"-S" = {
			set_if = "$spop_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$spop_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$spop_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$spop_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$spop_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$spop_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.spop_address = "$check_address$"
	vars.check_ipv4 = "$spop_ipv4$"
	vars.check_ipv6 = "$spop_ipv6$"
}

object CheckCommand "ntp_time" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ntp_time" ]

	arguments = {
		"-H" = {
			value = "$ntp_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$ntp_port$"
			description = "Port number (default: 123)"
		}
		"-q" = {
			set_if = "$ntp_quiet$"
			description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
		}
		"-w" = {
			value = "$ntp_warning$"
			description = "Offset to result in warning status (seconds)"
		}
		"-c" = {
			value = "$ntp_critical$"
			description = "Offset to result in critical status (seconds)"
		}
		"-o" = {
			value = "$ntp_timeoffset$"
			description = "Expected offset of the ntp server relative to local server (seconds)"
		}
		"-t" = {
			value = "$ntp_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$ntp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$ntp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.ntp_address = "$check_address$"
	vars.check_ipv4 = "$ntp_ipv4$"
	vars.check_ipv6 = "$ntp_ipv6$"
}

object CheckCommand "ntp_peer" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ntp_peer" ]

	arguments = {
		"-H" = {
			value = "$ntp_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$ntp_port$"
			description = "Port number (default: 123)"
		}
		"-q" = {
			set_if = "$ntp_quiet$"
			description = "Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized"
		}
		"-w" = {
			value = "$ntp_warning$"
			description = "Offset to result in warning status (seconds)"
		}
		"-c" = {
			value = "$ntp_critical$"
			description = "Offset to result in critical status (seconds)"
		}
		"-W" = {
			value = "$ntp_wstratum$"
			description = "Warning threshold for stratum of server's synchronization peer"
		}
		"-C" = {
			value = "$ntp_cstratum$"
			description = "Critical threshold for stratum of server's synchronization peer"
		}
		"-j" = {
			value = "$ntp_wjitter$"
			description = "Warning threshold for jitter"
		}
		"-k" = {
			value = "$ntp_cjitter$"
			description = "Critical threshold for jitter"
		}
		"-m" = {
			value = "$ntp_wsource$"
			description = "Warning threshold for number of usable time sources (truechimers)"
		}
		"-n" = {
			value = "$ntp_csource$"
			description = "Critical threshold for number of usable time sources (truechimers)"
		}
		"-t" = {
			value = "$ntp_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$ntp_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$ntp_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.ntp_address = "$check_address$"
	vars.check_ipv4 = "$ntp_ipv4$"
	vars.check_ipv6 = "$ntp_ipv6$"
}

object CheckCommand "ssh" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ssh" ]

	arguments = {
		"-p" = {
			value = "$ssh_port$"
			description = "Port number (default: 22)"
		}
		"-t" = {
			value = "$ssh_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"host" = {
			value = "$ssh_address$"
			skip_key = true
			order = 1
		}
		"-4" = {
			set_if = "$ssh_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$ssh_ipv6$"
			description = "Use IPv6 connection"
		}
	}

	vars.ssh_address = "$check_address$"
	vars.check_ipv4 = "$ssh_ipv4$"
	vars.check_ipv6 = "$ssh_ipv6$"
}

object CheckCommand "disk" {
	command = [ PluginDir + "/check_disk" ]

	arguments = {
		"-w" = {
			value = "$disk_wfree$"
			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"
			required = true
			order = -3
		}
		"-c" = {
			value = "$disk_cfree$"
			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"
			required = true
			order = -3
		}
		"-W" = {
			value = "$disk_inode_wfree$"
			description = "Exit with WARNING status if less than PERCENT of inode space is free"
			order = -3
		}
		"-K" = {
			value = "$disk_inode_cfree$"
			description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
			order = -3
		}
		"-p" = {
			value = "$disk_partitions$"
			description = "Path or partition (may be repeated)"
			repeat_key = true
			order = 1
		}
		"-p_old" = {
			key = "-p"
			value = "$disk_partition$"
			order = 1
		}
		"-x" = {
			value = "$disk_partitions_excluded$"
			description = "Ignore device (only works if -p unspecified)"
		}
		"-x_old" = {
			key = "-x"
			value = "$disk_partition_excluded$"
		}
		"-C" = {
			set_if = "$disk_clear$"
			description = "Clear thresholds"
		}
		"-E" = {
			set_if = "$disk_exact_match$"
			description = "For paths or partitions specified with -p, only check for exact paths"
		}
		"-e" = {
			set_if = "$disk_errors_only$"
			description = "Display only devices/mountpoints with errors"
		}
		"-f" = {
			set_if = "$disk_ignore_reserved$"
			description = "Don't account root-reserved blocks into freespace in perfdata"
		}
		"-g" = {
			value = "$disk_group$"
			description = "Group paths. Thresholds apply to (free-)space of all partitions together"
		}
		"-k" = {
			set_if = "$disk_kilobytes$"
			description = "Same as --units kB"
		}
		"-l" = {
			set_if = "$disk_local$"
			description = " Only check local filesystems"
		}
		"-L" = {
			set_if = "$disk_stat_remote_fs$"
			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)"
		}
		"-M" = {
			set_if = "$disk_mountpoint$"
			description = "Display the mountpoint instead of the partition"
		}
		"-m" = {
			set_if = "$disk_megabytes$"
			description = "Same as --units MB"
		}
		"-A" = {
			set_if = "$disk_all$"
			description = "Explicitly select all paths. This is equivalent to -R .*"
			order = 1
		}
		"-R" = {
			value = "$disk_eregi_path$"
			description = "Case insensitive regular expression for path/partition (may be repeated)"
			repeat_key = true
		}
		"-r" = {
			value = "$disk_ereg_path$"
			description = "Regular expression for path or partition (may be repeated)"
			repeat_key = true
		}
		"-I" = {
			value = "$disk_ignore_eregi_path$"
			description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
			repeat_key = true
			order = 2
		}
		"-i" = {
			value = "$disk_ignore_ereg_path$"
			description = "Regular expression to ignore selected path or partition (may be repeated)"
			repeat_key = true
			order = 2
		}
		"-t" = {
			value = "$disk_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-u" = {
			value = "$disk_units$"
			description = "Choose bytes, kB, MB, GB, TB (default: MB)"
		}
		"-X" = {
			value = "$disk_exclude_type$"
			description = "Ignore all filesystems of indicated type (may be repeated)"
			repeat_key = true
		}
		"-N" = {
			value = "$disk_include_type$"
			description = "Check only filesystems of indicated type (may be repeated)"
			repeat_key = true
		}
	}

	vars.disk_wfree = "20%"
	vars.disk_cfree = "10%"
	vars.disk_megabytes = true
	vars.disk_exclude_type = [
		"none",
		"tmpfs",
		"sysfs",
		"proc",
		"configfs",
		"devtmpfs",
		"devfs",
		"mtmfs",
		"tracefs",
		"cgroup",
		"fuse.gvfsd-fuse",
		"fuse.gvfs-fuse-daemon",
		"fdescfs",
		"overlay",
		"nsfs",
		"squashfs"
	]
}

object CheckCommand "disk_smb" {
	command = [ PluginDir + "/check_disk_smb" ]

	arguments = {
		"-H" = {
			value = "$disk_smb_hostname$"
			description = "NetBIOS name of the server."
		}
		"-s" = {
			value = "$disk_smb_share$"
			description = "Share name to be tested."
		}
		"-W" = {
			value = "$disk_smb_workgroup$"
			description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
		}
		"-a" = {
			value = "$disk_smb_address$"
			description = "IP-address of HOST (only necessary if HOST is in another network)."
		}
		"-u" = {
			value = "$disk_smb_username$"
			description = "Username to log in to server. (Defaults to 'guest' if omitted)."
		}
		"-p" = {
			value = "$disk_smb_password$"
			description = "Password to log in to server. (Defaults to an empty password if omitted)."
		}
		"-w" = {
			value = "$disk_smb_wused$"
			description = "Percent of used space at which a warning will be generated (Default: 85%)."
		}
		"-c" = {
			value = "$disk_smb_cused$"
			description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
		}
		"-P" = {
			value = "$disk_smb_port$"
			description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
		}
	}

	vars.disk_smb_wused = "85%"
	vars.disk_smb_cused = "95%"
}

object CheckCommand "users" {
	command = [ PluginDir + "/check_users" ]

	arguments = {
		"-w" = {
			value = "$users_wgreater$"
			description = "Set WARNING status if more than INTEGER users are logged in"
		}
		"-c" = {
			value = "$users_cgreater$"
			description = "Set CRITICAL status if more than INTEGER users are logged in"
		}
	}

	vars.users_wgreater = 20
	vars.users_cgreater = 50
}

object CheckCommand "procs" {
	command = [ PluginDir + "/check_procs" ]

	arguments = {
		"-w" = {
			value = "$procs_warning$"
			description = "Generate warning state if metric is outside this range"
		}
		"-c" = {
			value = "$procs_critical$"
			description = "Generate critical state if metric is outside this range"
		}
		"-m" = {
			value = "$procs_metric$"
			description = "Check thresholds against metric"
		}
		"-t" = {
			value = "$procs_timeout$"
			description = "Seconds before plugin times out"
		}
		"-T" = {
			set_if = "$procs_traditional$"
			description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
		}
		"-s" = {
			value = "$procs_state$"
			description = "Only scan for processes that have one or more of the status flags you specify"
		}
		"-p" = {
			value = "$procs_ppid$"
			description = "Only scan for children of the parent process ID indicated"
		}
		"-z" = {
			value = "$procs_vsz$"
			description = "Only scan for processes with VSZ higher than indicated"
		}
		"-r" = {
			value = "$procs_rss$"
			description = "Only scan for processes with RSS higher than indicated"
		}
		"-P" = {
			value = "$procs_pcpu$"
			description = "Only scan for processes with PCPU higher than indicated"
		}
		"-u" = {
			value = "$procs_user$"
			description = "Only scan for processes with user name or ID indicated"
		}
		"-a" = {
			value = "$procs_argument$"
			description = "Only scan for processes with args that contain STRING"
		}
		"--ereg-argument-array" = {
			value = "$procs_argument_regex$"
			description = "Only scan for processes with args that contain the regex STRING"
		}
		"-C" = {
			value = "$procs_command$"
			description = "Only scan for exact matches of COMMAND (without path)"
		}
		"-k" = {
			set_if = "$procs_nokthreads$"
			description = "Only scan for non kernel threads"
		}
	}

	vars.procs_traditional = false
	vars.procs_nokthreads = false
	vars.procs_warning = 250
	vars.procs_critical = 400
}

object CheckCommand "swap" {
	command = [ PluginDir + "/check_swap" ]

	arguments = {
		"-w" = {{
			if (macro("$swap_integer$")) {
				return macro("$swap_wfree$")
			} else {
				return macro("$swap_wfree$%")
			}
		}}
		"-c" = {{
			if (macro("$swap_integer$")) {
				return macro("$swap_cfree$")
			} else {
				return macro("$swap_cfree$%")
			}
		}}
		"-a" = {
			set_if = "$swap_allswaps$"
			description = "Conduct comparisons for all swap partitions, one by one"
		}
		"-n" = {
			value = "$swap_noswap$"
			description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
		}
	}

	vars.swap_wfree = 50
	vars.swap_cfree = 25
	vars.swap_integer = false
	vars.swap_allswaps = false
}

object CheckCommand "load" {
	command = [ PluginDir + "/check_load" ]

	arguments = {
		"-w" = {
			value = "$load_wload1$,$load_wload5$,$load_wload15$"
			description = "Exit with WARNING status if load average exceeds WLOADn"
		}
		"-c" = {
			value = "$load_cload1$,$load_cload5$,$load_cload15$"
			description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
		}
		"-r" = {
			set_if = "$load_percpu$"
			description = "Divide the load averages by the number of CPUs (when possible)"
		}
	}

	vars.load_wload1 = 5.0
	vars.load_wload5 = 4.0
	vars.load_wload15 = 3.0

	vars.load_cload1 = 10.0
	vars.load_cload5 = 6.0
	vars.load_cload15 = 4.0

	vars.load_percpu = false
}

object CheckCommand "snmp" {
	command = [ PluginDir + "/check_snmp" ]

	arguments = {
		"-H" = {
			value = "$snmp_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-o" = {
			value = "$snmp_oid$"
			description = "Object identifier(s) or SNMP variables whose value you wish to query"
		}
		"-C" = {
			value = "$snmp_community$"
			description = "Optional community string for SNMP communication (default is 'public')"
		}
		"-c" = {
			value = "$snmp_crit$"
			description = "Critical threshold range(s)"
		}
		"-w" = {
			value = "$snmp_warn$"
			description = "Warning threshold range(s)"
		}
		"-s" = {
			value = "$snmp_string$"
			description = "Return OK state (for that OID) if STRING is an exact match"
		}
		"-r" = {
			value = "$snmp_ereg$"
			description = "Return OK state (for that OID) if extended regular expression REGEX matches"
		}
		"-R" = {
			value = "$snmp_eregi$"
			description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
		}
		"-l" = {
			value = "$snmp_label$"
			description = "Prefix label for output from plugin"
		}
		"-u" = {
			value = "$snmp_units$"
			description = "Units label(s) for output data (e.g., 'sec.')"
		}
		"-t" = {
			value = "$snmp_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-p" = {
			value = "$snmp_port$"
			description = "Port number (default: 161)"
		}
		"-e" = {
			value = "$snmp_retries$"
			description = "Number of retries to be used in the requests"
		}
		"--invert-search" = {
			set_if = "$snmp_invert_search$"
			description = "Invert search result and return CRITICAL if found"
		}
		"-P" = {
			value = "$snmp_version$"
			description = "SNMP protocol version"
		}
		"-m" = {
			value = "$snmp_miblist$"
			description = "List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL' for symbolic OIDs.)"
		}
		"--rate-multiplier" = {
			value = "$snmp_rate_multiplier$"
			description = "Converts rate per second. For example, set to 60 to convert to per minute"
		}
		"--rate" = {
			set_if = "$snmp_rate$"
			description = "Enable rate calculation"
		}
		"-n" = {
			set_if = "$snmp_getnext$"
			description = "Use SNMP GETNEXT instead of SNMP GET"
		}
		"--offset" = {
			value = "$snmp_offset$"
			description = "Add/substract the specified OFFSET to numeric sensor data"
		}
		"-D" = {
			value = "$snmp_output_delimiter$"
			description = "Separates output on multiple OID requests"
		}
		"-O" = {
			set_if = "$snmp_perf_oids$"
			description = "Label performance data with OIDs instead of --label's"
		}
	}

	vars.snmp_address = {{
		var addr_v4 = macro("$address$")
		var addr_v6 = macro("$address6$")

		if (addr_v4) {
			return addr_v4
		} else {
			return "udp6:[" + addr_v6 + "]"
		}
	}}

	vars.snmp_community = "public"
	vars.snmp_invert_search = false
	vars.snmp_timeout = "10"
}

object CheckCommand "snmpv3" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_snmp" ]

	arguments = {
		"-H" = {
			value = "$snmpv3_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$snmpv3_port$"
			description = "Port number"
		}
		"-n" = {
			set_if = "$snmpv3_getnext$"
			description = "Use SNMP GETNEXT instead of SNMP GET"
		}
		"-P" = {
			value = 3
			description = "SNMP protocol version"
		}
		"-L" = {
			value = "$snmpv3_seclevel$"
			description = "SNMPv3 securityLevel"
		}
		"-a" = {
			value = "$snmpv3_auth_alg$"
			description = "SNMPv3 auth proto"
		}
		"-U" = {
			value = "$snmpv3_user$"
			description = "SNMPv3 username"
		}
		"-N" = {
			value = "$snmpv3_context$"
			description = "SNMPv3 context"
		}
		"-A" = {
			value = "$snmpv3_auth_key$"
			description = "SNMPv3 authentication password"
		}
		"-X" = {
			value = "$snmpv3_priv_key$"
			description = "SNMPv3 privacy password"
		}
		"-o" = {
			value = "$snmpv3_oid$"
			description = "Object identifier(s) or SNMP variables whose value you wish to query"
		}
		"-x" = {
			value = "$snmpv3_priv_alg$"
			description = "SNMPv3 priv proto (default DES)"
		}
		"-w" = {
			value = "$snmpv3_warn$"
			description = "Warning threshold range(s)"
		}
		"-c" = {
			value = "$snmpv3_crit$"
			description = "Critical threshold range(s)"
		}
		"-s" = {
			value = "$snmpv3_string$"
			description = "Return OK state (for that OID) if STRING is an exact match"
		}
		"-r" = {
			value = "$snmpv3_ereg$"
			description = "Return OK state (for that OID) if extended regular expression REGEX matches"
		}
		"-R" = {
			value = "$snmpv3_eregi$"
			description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
		}
		"--invert-search" = {
			set_if = "$snmpv3_invert_search$"
			description = "Invert search result and return CRITICAL if found"
		}
		"-l" = {
			value = "$snmpv3_label$"
			description = "Prefix label for output from plugin"
		}
		"-m" = {
			value = "$snmpv3_miblist$"
			description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
		}
		"-u" = {
			value = "$snmpv3_units$"
			description = "Units label(s) for output data (e.g., 'sec.')"
		}
		"--rate-multiplier" = {
			value = "$snmpv3_rate_multiplier$"
			description = "Converts rate per second. For example, set to 60 to convert to per minute"
		}
		"--rate" = {
			set_if = "$snmpv3_rate$"
			description = "Enable rate calculation"
		}
		"-t" = {
			value = "$snmpv3_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
	}

	vars.snmpv3_address = "$check_address$"
	vars.snmpv3_auth_alg = "SHA"
	vars.snmpv3_priv_alg = "AES"
	vars.snmpv3_seclevel = "authPriv"
	vars.snmpv3_timeout = "10"
}

object CheckCommand "snmp-uptime" {
	import "snmp"

	vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
}

object CheckCommand "apt" {
	command = [ PluginDir + "/check_apt" ]

	arguments = {
		// apt-get takes only options starting with "-" (like "-sqq") before
		// the upgrade command, so passing e.g. "foobar" as "--upgrade=foobar"
		// makes no sense. This allows to easily decide between "-x=-y"
		// (strings starting with "-") and "-x" (everything else).
		"--upgrade" = {
			set_if = {{
				var v = macro("$apt_upgrade$")
				return match("-*", string(v).trim()) ? false : v
			}}
			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."
		}
		"--dist-upgrade" = {
			set_if = {{
				var v = macro("$apt_dist_upgrade$")
				return match("-*", string(v).trim()) ? false : v
			}}
			description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
		}
		"--upgrade=OPTS" = {
			set_if = {{ match("-*", string(macro("$apt_upgrade$")).trim()) }}
			key = "--upgrade"
			separator = "="
			value = "$apt_upgrade$"
			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."
		}
		"--dist-upgrade=OPTS" = {
			set_if = {{ match("-*", string(macro("$apt_dist_upgrade$")).trim()) }}
			key = "--dist-upgrade"
			separator = "="
			value = "$apt_dist_upgrade$"
			description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
		}

		"--extra-opts" = {
			value = "$apt_extra_opts$"
			description = "Read options from an ini file."
		}
		"--include" = {
			value = "$apt_include$"
			description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
		}
		"--exclude" = {
			value = "$apt_exclude$"
			description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
		}
		"--critical" = {
			value = "$apt_critical$"
			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."
		}
		"--timeout" = {
			value = "$apt_timeout$"
			description = "Seconds before plugin times out (default: 10)."
		}
		"--only-critical" = {
			set_if = "$apt_only_critical$"
			description = "Only warn about critical upgrades."
		}
		"--list" = {
			set_if = "$apt_list$"
			description = "List packages available for upgrade."
		}
	}

	timeout = 5m
}

object CheckCommand "dhcp" {
	command = [ PluginDir + "/check_dhcp" ]

	arguments = {
		"-s" = {
			value = "$dhcp_serverip$"
			description = "IP address of DHCP server that we must hear from"
		}
		"-r" = {
			value = "$dhcp_requestedip$"
			description = "IP address that should be offered by at least one DHCP server"
		}
		"-t" = {
			value = "$dhcp_timeout$"
			description = "Seconds to wait for DHCPOFFER before timeout occurs"
		}
		"-i" = {
			value = "$dhcp_interface$"
			description = "Interface to to use for listening (i.e. eth0)"
		}
		"-m" = {
			value = "$dhcp_mac$"
			description = "MAC address to use in the DHCP request"
		}
		"-u" = {
			set_if = "$dhcp_unicast$"
			description = "Unicast testing: mimic a DHCP relay"
		}
	}

	vars.dhcp_unicast = false
}

object CheckCommand "dns" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_dns" ]

	arguments = {
		"-H" = {
			value = "$dns_lookup$"
			description = "The name or address you want to query."
		}
		"-s" = {
			value = "$dns_server$"
			description = "Optional DNS server you want to use for the lookup."
		}
		"-q" = {
			value = "$dns_query_type$"
			description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
		}
		"-a" = {
			value = "$dns_expected_answers$"
			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: for version 2.2 and earlier of the monitoring-plugins, you have to match the whole string of addresses separated with commas (sorted alphabetically). For version 2.3 and later, you need to pass a list of strings, one for each address you want to match."
		}
		"-L" = {
			set_if = "$dns_all_expected$"
			description = "Return critical if the list of expected addresses does not match all addresses returned. Only supported in newer versions of monitoring-plugins (2.3 and later), and is needed in such versions to replicate behaviour of previous versions of the plugins. When not passed, one address is enough for success, instead of all."
		}
		"-A" = {
			set_if = "$dns_authoritative$"
			description = "Optionally expect the DNS server to be authoritative for the lookup"
		}
		"-n" = {
			set_if = "$dns_accept_cname$"
			description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
		}
		"-w" = {
			value = "$dns_wtime$"
			description = "Return warning if elapsed time exceeds value."
		}
		"-c" = {
			value = "$dns_ctime$"
			description = "Return critical if elapsed time exceeds value."
		}
		"-t" = {
			value = "$dns_timeout$"
			description = "Seconds before connection times out. Defaults to 10."
		}
	}

	vars.dns_lookup = "$host.name$"
	vars.dns_timeout = 10
}

object CheckCommand "dig" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_dig" ]

	arguments = {
		"-H" = {
			value = "$dig_server$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$dig_port$"
			description = "Port number (default: 53)"
		}
		"-l" = {
			value = "$dig_lookup$"
			required = true
			description = "Machine name to lookup"
		}
		"-T" = {
			value = "$dig_record_type$"
			description = "Record type to lookup (default: A)"
		}
		"-a" = {
			value = "$dig_expected_address$"
			description = "An address expected to be in the answer section"
		}
		"-A" = {
			value = "$dig_arguments$"
			description = "Pass STRING as argument(s) to dig"
		}
		"-w" = {
			value = "$dig_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$dig_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$dig_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-4" = {
			set_if = "$dig_ipv4$"
			description = "Force dig to only use IPv4 query transport"
		}
		"-6" = {
			set_if = "$dig_ipv6$"
			description = "Force dig to only use IPv6 query transport"
		}
	}

	vars.dig_server = "$check_address$"
	vars.check_ipv4 = "$dig_ipv4$"
	vars.check_ipv6 = "$dig_ipv6$"
}

object CheckCommand "nscp" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_nt" ]

	arguments = {
		"-H" = {
			value = "$nscp_address$"
			description = "Name of the host to check"
		}
		"-p" = {
			value = "$nscp_port$"
			description = "Optional port number (default: 1248)"
		}
		"-s" = {
			value = "$nscp_password$"
			description = "Password needed for the request"
		}
		"-v" = {
			value = "$nscp_variable$"
			required = true
			description = "Variable to check"
		}
		"-l" = {
			value = "$nscp_params$"
			repeat_key = false
		}
		"-w" = {
			value = "$nscp_warn$"
			description = "Threshold which will result in a warning status"
		}
		"-c" = {
			value = "$nscp_crit$"
			description = "Threshold which will result in a critical status"
		}
		"-t" = {
			value = "$nscp_timeout$"
			description = "Seconds before connection attempt times out"
		}
		"-d" = {
			value = "SHOWALL"
			set_if = "$nscp_showall$"
			description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
		}
	}

	vars.nscp_address = "$check_address$"
	vars.nscp_port = 12489
	vars.nscp_showall = false
}

object CheckCommand "by_ssh" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_by_ssh" ]

	arguments = {
		"-H" = {
			value = "$by_ssh_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$by_ssh_port$"
			description = "Port number (default: none)"
		}
		"-C" = {{
			var command = macro("$by_ssh_command$")
			var arguments = macro("$by_ssh_arguments$")

			if (typeof(command) == String && !arguments) {
				return command
			}

			var escaped_args = []
			for (arg in resolve_arguments(command, arguments)) {
				escaped_args.add(escape_shell_arg(arg))
			}
			return escaped_args.join(" ")
		}}
		"-l" = {
			value = "$by_ssh_logname$"
			description = "SSH user name on remote host [optional]"
		}
		"-i" = {
			value = "$by_ssh_identity$"
			description = "identity of an authorized key [optional]"
		}
		"-q" = {
			set_if = "$by_ssh_quiet$"
			description = "Tell ssh to suppress warning and diagnostic messages [optional]"
		}
		"-w" = {
			value = "$by_ssh_warn$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$by_ssh_crit$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$by_ssh_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-o" = {
			value = "$by_ssh_options$"
			description = "Provide ssh options (may be repeated)"
		}
		"-4" = {
			set_if = "$by_ssh_ipv4$"
			description = "Use IPv4 only"
		}
		"-6" = {
			set_if = "$by_ssh_ipv6$"
			description = "Use IPv6 only"
		}
		"-E" = {
			value = "$by_ssh_skip_stderr$"
			description = "Ignore all or (if specified) first n lines on STDERR [optional]"
		}
	}

	vars.by_ssh_address = "$check_address$"
	vars.by_ssh_quiet = false
	vars.check_ipv4 = "$by_ssh_ipv4$"
	vars.check_ipv6 = "$by_ssh_ipv6$"
}

object CheckCommand "ups" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ups" ]

	arguments = {
		"-H" = {
			value = "$ups_address$"
			description = "Address of the upsd server"
			required = true
		}
		"-u" = {
			value = "$ups_name$"
			description = "Name of the UPS to monitor"
			required = true
		}
		"-p" = {
			value = "$ups_port$"
			description = "Port number (default: 3493)"
		}
		"-v" = {
			value = "$ups_variable$"
			description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
		}
		"-w" = {
			value = "$ups_warning$"
			description = "Warning threshold for the selected variable"
		}
		"-c" = {
			value = "$ups_critical$"
			description = "Critical threshold for the selected variable"
		}
		"-T" = {
			set_if = "$ups_celsius$"
			description = "Display temperature in degrees Celsius instead of Fahrenheit"
		}
		"-t" = {
			value = "$ups_timeout$"
			description = "Seconds before the connection times out (default: 10)"
		}
	}

	vars.ups_address = "$check_address$"
	vars.ups_name = "ups"
}

object CheckCommand "nrpe" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_nrpe" ]

	arguments = {
		"-H" = {
			value = "$nrpe_address$"
			description = "The address of the host running the NRPE daemon"
		}
		"-p" = {
			value = "$nrpe_port$"
		}
		"-c" = {
			value = "$nrpe_command$"
		}
		"-n" = {
			set_if = "$nrpe_no_ssl$"
			description = "Do not use SSL"
		}
		"-u" = {
			set_if = "$nrpe_timeout_unknown$"
			description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
		}
		"-t" = {
			value = "$nrpe_timeout$"
			description = "<interval>:<state> = <Number of seconds before connection times out>:<Check state to exit with in the event of a timeout (default=CRITICAL)>"
		}
		"-a" = {
			value = "$nrpe_arguments$"
			repeat_key = false
			order = 1
		}
		"-4" = {
			set_if = "$nrpe_ipv4$"
			description = "Use IPv4 connection"
		}
		"-6" = {
			set_if = "$nrpe_ipv6$"
			description = "Use IPv6 connection"
		}
		"-2" = {
			set_if = "$nrpe_version_2$"
			description = "Use this if you want to connect to NRPE v2"
		}
		"-A" = {
			value = "$nrpe_ca$"
			description = "The CA file to use for PKI"
		}
		"-C" = {
			value = "$nrpe_cert$"
			description = "The cert file to use for PKI"
		}
		"-K" = {
			value = "$nrpe_key$"
			description = "The key file to use for PKI"
		}
		"-S" = {
			value = "$nrpe_ssl_version$"
			description = "The SSL/TLS version to use"
		}
		"-L" = {
			value = "$nrpe_cipher_list$"
			description = "The list of SSL ciphers to use"
		}
		"-d" = {
			value = "$nrpe_dh_opt$"
			description = "Anonymous Diffie Hellman use: 0 = deny, 1 = allow, 2 = force"
		}
	}

	vars.nrpe_address = "$check_address$"
	vars.nrpe_no_ssl = false
	vars.nrpe_timeout_unknown = false
	vars.check_ipv4 = "$nrpe_ipv4$"
	vars.check_ipv6 = "$nrpe_ipv6$"
	vars.nrpe_version_2 = false
	timeout = 5m
}

object CheckCommand "hpjd" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_hpjd" ]

	arguments = {
		"-H" = {
			value = "$hpjd_address$"
			description = "Host address"
		}
		"-C" = {
			value = "$hpjd_community$"
			description = "The SNMP community name (default=public)"
		}
		"-p" = {
			value = "$hpjd_port$"
			description = "Specify the port to check (default=161)"
		}
	}

	vars.hpjd_address = "$check_address$"
}

object CheckCommand "icmp" {
	command = [ PluginDir + "/check_icmp" ]

	arguments = {
		"-H" = {
			value = "$icmp_address$"
			repeat_key = false
			order = 1
			description = "Host address"
		}
		"-w" = {
			value = "$icmp_wrta$,$icmp_wpl$%"
			description = "warning threshold (currently 200.000ms,40%)"
		}
		"-c" = {
			value = "$icmp_crta$,$icmp_cpl$%"
			description = "critical threshold (currently 500.000ms,80%)"
		}
		"-s" = {
			value = "$icmp_source$"
			description = "specify a source IP address or device name"
		}
		"-n" = {
			value = "$icmp_packets$"
			description = "number of packets to send (currently 5)"
		}
		"-i" = {
			value = "$icmp_packet_interval$"
			description = "max packet interval (currently 80.000ms)"
		}
		"-I" = {
			value = "$icmp_target_interval$"
			description = "max target interval (currently 0.000ms)"
		}
		"-m" = {
			value = "$icmp_hosts_alive$"
			description = "number of alive hosts required for success"
		}
		"-b" = {
			value = "$icmp_data_bytes$"
			description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
		}
		"-t" = {
			value = "$icmp_timeout$"
			description = "timeout value (seconds, currently  10)"
		}
		"-l" = {
			value = "$icmp_ttl$"
			description = "TTL on outgoing packets (currently 0)"
		}
	}

	vars.icmp_address = "$address$"
	vars.icmp_wrta = 100
	vars.icmp_wpl = 5
	vars.icmp_crta = 200
	vars.icmp_cpl = 15
}

object CheckCommand "ldap" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_ldap" ]

	arguments = {
		"-H" = {
			value = "$ldap_address$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-p" = {
			value = "$ldap_port$"
			description = "Port number (default: 389)"
		}
		"-a" = {
			value = "$ldap_attr$"
			description = "ldap attribute to search (default: \"(objectclass=*)\""
		}
		"-b" = {
			value = "$ldap_base$"
			required = true
			description = "ldap base (eg. ou=my unit, o=my org, c=at"
		}
		"-D" = {
			value = "$ldap_bind$"
			description = "ldap bind DN (if required)"
		}
		"-P" = {
			value = "$ldap_pass$"
			description = "ldap password (if required)"
		}
		"-T" = {
			set_if = "$ldap_starttls$"
			description = "use starttls mechanism introduced in protocol version 3"
		}
		"-S" = {
			set_if = "$ldap_ssl$"
			description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
		}
		"-2" = {
			set_if = "$ldap_v2$"
			description = "Use LDAP protocol version 2"
		}
		"-3" = {
			set_if = "$ldap_v3$"
			description = "Use LDAP protocol version 3"
		}
		"-w" = {
			value = "$ldap_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$ldap_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-W" = {
			value = "$ldap_warning_entries$"
			description = "Number of found entries to result in warning status (optional)"
		}
		"-C" = {
			value = "$ldap_critical_entries$"
			description = "Number of found entries to result in critical status (optional)"
		}
		"-t" = {
			value = "$ldap_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-v" = {
			set_if = "$ldap_verbose$"
			description = "Show details for command-line debugging"
		}
	}

	vars.ldap_address = "$check_address$"
	vars.ldap_v2 = true
	vars.ldap_v3 = false
	vars.ldap_timeout = 10s
	vars.ldap_verbose = false
}

object CheckCommand "clamd" {
	command = [ PluginDir + "/check_clamd" ]

	arguments = {
		"-H" = {
			value = "$clamd_address$"
			description = "The host's address or unix socket (must be an absolute path)."
			required = true
		}
		"-p" = {
			value = "$clamd_port$"
			description = "Port number (default: none)."
		}
		"-e" = {
			value = "$clamd_expect$"
			description = "String to expect in server response (may be repeated)."
			repeat_key = true
		}
		"-A" = {
			set_if = "$clamd_all$"
			description = "All expect strings need to occur in server response. Default is any."
		}
		"-E_send" = {
			key = "-E"
			order = 1
			set_if = "$clamd_escape_send$"
			description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
		}
		"-s" = {
			order = 2
			value = "$clamd_send$"
			description = "String to send to the server."
		}
		"-E_quit" = {
			key = "-E"
			order = 3
			set_if = "$clamd_escape_quit$"
			description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
		}
		"-q" = {
			order = 4
			value = "$clamd_quit$"
			description = "String to send server to initiate a clean close of the connection."
		}
		"-r" = {
			value = "$clamd_refuse$"
			description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
		}
		"-M" = {
			value = "$clamd_mismatch$"
			description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
		}
		"-j" = {
			set_if = "$clamd_jail$"
			description = "Hide output from TCP socket."
		}
		"-m" = {
			value = "$clamd_maxbytes$"
			description = "Close connection once more than this number of bytes are received."
		}
		"-d" = {
			value = "$clamd_delay$"
			description = "Seconds to wait between sending string and polling for response."
		}
		"-D" = {
			value = "$clamd_certificate$"
			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."
		}
		"-S" = {
			set_if = "$clamd_ssl$"
			description = "Use SSL for the connection."
		}
		"-w" = {
			value = "$clamd_wtime$"
			description = "Response time to result in warning status (seconds)."
		}
		"-c" = {
			value = "$clamd_ctime$"
			description = "Response time to result in critical status (seconds)."
		}
		"-t" = {
			value = "$clamd_timeout$"
			description = "Seconds before connection times out. Defaults to 10."
		}
		"-4" = {
			set_if = "$clamd_ipv4$"
			description = "Use IPv4 only"
		}
		"-6" = {
			set_if = "$clamd_ipv6$"
			description = "Use IPv6 only"
		}
	}

	vars.clamd_ssl = false
	vars.clamd_refuse = "crit"
	vars.clamd_mismatch = "warn"
	vars.clamd_timeout = 10
	vars.check_ipv4 = "$clamd_ipv4$"
	vars.check_ipv6 = "$clamd_ipv6$"
}

object CheckCommand "mailq" {
	command = [ PluginDir + "/check_mailq" ]

	arguments = {
		"-w" = {
			value = "$mailq_warning$"
			description = "Min. number of messages in queue to generate warning"
			required = true
		}
		"-c" = {
			value = "$mailq_critical$"
			description = "Min. number of messages in queue to generate critical alert ( w < c )"
			required = true
		}
		"-W" = {
			value = "$mailq_domain_warning$"
			description = "Min. number of messages for same domain in queue to generate warning"
		}
		"-C" = {
			value = "$mailq_domain_critical$"
			description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
		}
		"-t" = {
			value = "$mailq_timeout$"
			description = "Plugin timeout in seconds (default = 15)"
		}
		"-M" = {
			value = "$mailq_servertype$"
			description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
		}
		"-s" = {
			set_if = "$mailq_sudo$"
			description = "Use sudo for mailq command"
		}
	}
}

object CheckCommand "pgsql" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_pgsql" ]

	arguments = {
		"-H" = {
			value = "$pgsql_hostname$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-P" = {
			value = "$pgsql_port$"
			description = "Port number (default: 5432)"
		}
		"-d" = {
			value = "$pgsql_database$"
			description = "Database to check (default: template1)"
		}
		"-l" = {
			value = "$pgsql_username$"
			description = "Login name of user"
		}
		"-p" = {
			value = "$pgsql_password$"
			description = "Password (BIG SECURITY ISSUE)"
		}
		"-o" = {
			value = "$pgsql_options$"
			description = "Connection parameters (keyword = value), see below"
			}
		"-w" = {
			value = "$pgsql_warning$"
			description = "Response time to result in warning status (seconds)"
		}
		"-c" = {
			value = "$pgsql_critical$"
			description = "Response time to result in critical status (seconds)"
		}
		"-t" = {
			value = "$pgsql_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-q" = {
			value = "$pgsql_query$"
			description = "SQL query to run. Only first column in first row will be read"
		}
		"-W" = {
			value = "$pgsql_query_warning$"
			description = "SQL query value to result in warning status (double)"
		}
		"-C" = {
			value = "$pgsql_query_critical$"
			description = "SQL query value to result in critical status (double)"
		}
	}

	vars.pgsql_hostname = "$check_address$"
}

object CheckCommand "mysql" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_mysql" ]

	arguments = {
		"-H" = {
			set_if = {{ !macro("$mysql_socket$") }}
			value = "$mysql_hostname$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-P" = {
			value = "$mysql_port$"
			description = "Port number (default: 3306)"
		}
		"-n" = {
			set_if = "$mysql_ignore_auth$"
			description = "Ignore authentication failure and check for mysql connectivity only"
		}
		"-s" = {
			value = "$mysql_socket$"
			description = "Use the specified socket"
		}
		"-d" = {
			value = "$mysql_database$"
			description = "Check database with indicated name"
		}
		"-f" = {
			value = "$mysql_file$"
			description = "Read from the specified client options file"
		}
		"-g" = {
			value = "$mysql_group$"
			description = "Use a client options group"
		}
		"-u" = {
			value = "$mysql_username$"
			description = "Connect using the indicated username"
		}
		"-p" = {
			value = "$mysql_password$"
			description = "Use the indicated password to authenticate the connection"
		}
		"-S" = {
			set_if = "$mysql_check_slave$"
			description = "Check if the slave thread is running properly"
		}
		"-w" = {
			value = "$mysql_warning$"
			description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
		}
		"-c" = {
			value = "$mysql_critical$"
			description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
		}
		"-l" = {
			set_if = "$mysql_ssl$"
			description = "Use ssl encryptation"
		}
		"-C" = {
			value = "$mysql_cacert$"
			description = "Path to CA signing the cert"
		}
		"-a" = {
			value = "$mysql_cert$"
			description = "Path to SSL certificate"
		}
		"-k" = {
			value = "$mysql_key$"
			description = "Path to private SSL key"
		}
		"-D" = {
			value = "$mysql_cadir$"
			description = "Path to CA directory"
		}
		"-L" = {
			value = "$mysql_ciphers$"
			description = "List of valid SSL ciphers"
		}
	}

	vars.mysql_hostname = "$check_address$"
}

object CheckCommand "negate" {
	command = [ PluginDir + "/negate" ]

	arguments = {
		"-t" = {
			value = "$negate_timeout$"
			description = "Seconds before plugin times out (default: 11)"
		}
		"-T" = {
			value = "$negate_timeout_result$"
			description = "Custom result on Negate timeouts"
		}
		"-o" = {
			value = "$negate_ok$"
		}
		"-w" = {
			value = "$negate_warning$"
		}
		"-c" = {
			value = "$negate_critical$"
		}
		"-u" = {
			value = "$negate_unknown$"
		}
		"-s" = {
			set_if = "$negate_substitute$"
			description = "Substitute output text as well. Will only substitute text in CAPITALS"
		}
		"--wrapped-plugin" = {
			value = {{
				var command = macro("$negate_command$")
				var arguments = macro("$negate_arguments$")

				if (typeof(command) == String && !arguments) {
					return command
				}

				var escaped_args = []
				for (arg in resolve_arguments(command, arguments)) {
					escaped_args.add(arg)
				}
				return escaped_args.join(" ")
			}}
			skip_key = true
			order = 1
		}
	}

	vars.negate_timeout_result = "UNKNOWN"
}

object CheckCommand "file_age" {
	command = [ PluginDir + "/check_file_age" ]

	arguments = {
		"-w" = {
			value = "$file_age_warning_time$"
			description = "File must be no more than this many seconds old (default: 240s)"
		}
		"-c" = {
			value = "$file_age_critical_time$"
			description = "File must be no more than this many seconds old (default: 600s)"
		}
		"-W" = {
			value = "$file_age_warning_size$"
			description = "File must be at least this many bytes long"
		}
		"-C" = {
			value = "$file_age_critical_size$"
			description = "File must be at least this many bytes long (default: 0B)"
		}
		"-i" = {
			set_if = "$file_age_ignoremissing$"
			description = "return OK if the file does not exist"
		}
		"-f" = {
			value = "$file_age_file$"
			description = "File to monitor"
		}
	}

	vars.file_age_ignoremissing = false
}

object CheckCommand "smart" {
	command = [ PluginDir + "/check_ide_smart" ]

	arguments = {
		"-d" = {
			value = "$smart_device$"
			description = "Name of a local hard drive to monitor"
			required = true
		}
	}
}

object CheckCommand "breeze" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_breeze" ]

	arguments = {
		"-H" = {
			value = "$breeze_hostname$"
			description = "Name or IP address of host to check"
			required = true
		}
		"-C" = {
			value = "$breeze_community$"
			description = "SNMPv1 community (default public)"
		}
		"-w" = {
			value = "$breeze_warning$"
			description = "Percentage strength below which a WARNING status will result"
			required = true
		}
		"-c" = {
			value = "$breeze_critical$"
			description = "Percentage strength below which a CRITICAL status will result"
			required = true
		}
	}

	vars.breeze_hostname = "$check_address$"
	vars.breeze_warning = "50"
	vars.breeze_critical = "20"
}

object CheckCommand "flexlm" {
	command = [ PluginDir + "/check_flexlm" ]

	arguments = {
		"-F" = {
			value = "$flexlm_licensefile$"
			description = "Name of license file (usually license.dat)"
			required = true
		}
		"-t" = {
			value = "$flexlm_timeout$"
			description = "Plugin time out in seconds (default = 15)"
		}
	}
}

object CheckCommand "game" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_game" ]

	arguments = {
		"-P" = {
			value = "$game_port$"
			description = "Port to connect to"
		}
		"-t" = {
			value = "$game_timeout$"
			description = "Seconds before connection times out (default: 10)"
		}
		"-g" = {
			value = "$game_gamefield$"
			description = "Field number in raw qstat output that contains game name"
		}
		"-m" = {
			value = "$game_mapfield$"
			description = "Field number in raw qstat output that contains map name"
		}
		"-p" = {
			value = "$game_pingfield$"
			description = "Field number in raw qstat output that contains ping time"
		}
		"-G" = {
			value = "$game_gametime$"
			description = "Field number in raw qstat output that contains game time"
		}
		"-H" = {
			value = "$game_hostname$"
			description = "Name of the host running the game"
		}
		"game" = {
			value = "$game_game$"
			description = "Name of the game"
			order = 1
			skip_key = true
		}
		"ipaddress" = {
			value = "$game_ipaddress$"
			description = "Ipaddress of the game server to query"
			order = 2
			skip_key = true
		}
	}
}

object CheckCommand "mysql_query" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_mysql_query" ]

	arguments = {
		"-H" = {
			value = "$mysql_query_hostname$"
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-P" = {
			value = "$mysql_query_port$"
			description = "Port number (default: 3306)"
		}
		"-u" = {
			value = "$mysql_query_username$"
			description = "Username to login with"
		}
		"-p" = {
			value = "$mysql_query_password$"
			description = "Password to login with"
		}
		"-d" = {
			value = "$mysql_query_database$"
			description = "Database to check"
		}
		"-f" = {
			value = "$mysql_query_file$"
			description = "Read from the specified client options file"
		}
		"-g" = {
			value = "$mysql_query_group$"
			description = "Use a client options group"
		}
		"-q" = {
			value = "$mysql_query_execute$"
			description = "SQL query to run. Only first column in first row will be read"
		}
		"-w" = {
			value = "$mysql_query_warning$"
			description = "Warning range (format: start:end). Alert if outside this range"
		}
		"-c" = {
			value = "$mysql_query_critical$"
			description = "Critical range"
		}
	}

	vars.mysql_query_hostname = "$check_address$"
}

object CheckCommand "radius" {
	import "ipv4-or-ipv6"

	command = [
		PluginDir + "/check_radius",
	]

	arguments = {
		"-H" = {
			value = "$radius_address$",
			description = "Host name, IP Address, or unix socket (must be an absolute path)"
		}
		"-F" = {
			value = "$radius_config_file$",
			description = "Configuration file"
		}
		"-u" = {
			value = "$radius_username$",
			description = "The user to authenticate"
		}
		"-p" = {
			value = "$radius_password$",
			description = "Password for authentication"
		}
		"-P" = {
			value = "$radius_port$",
			description = "Port number (default: 1645)"
		},
		"-n" = {
			value = "$radius_nas_id$",
			description = "NAS identifier"
		}
		"-N" = {
			value = "$radius_nas_address$",
			description = "NAS IP Address"
		},
		"-e" = {
			value = "$radius_expect$",
			description = "Response string to expect from the server"
		},
		"-r" = {
			value = "$radius_retries$",
			description = "Number of times to retry a failed connection"
		},
		"-t" = {
			value = "$radius_timeout$",
			description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
		},
	}

	vars.radius_address = "$check_address$"
}

object CheckCommand "nscp_api" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_nscp_api" ]

	arguments = {
		"-H" = {
			value = "$nscp_api_host$"
			description = "NSCP API host address"
			required = true
		}
		"-P" = {
			value = "$nscp_api_port$"
			description = "NSCP API host port. Defaults to 8443."
		}
		"--password" = {
			value = "$nscp_api_password$"
			description = "NSCP API password"
		}
		"-q" = {
			value = "$nscp_api_query$"
			description = "NSCPI API Query endpoint to use"
		}
		"-a" = {
			value = "$nscp_api_arguments$"
			description = "NSCP API Query arguments"
			repeat_key = true
		}
	}

	vars.nscp_api_host = "$check_address$"
}

object CheckCommand "rpc" {
	import "ipv4-or-ipv6"

	command = [ PluginDir + "/check_rpc" ]

	arguments = {
		"-H" = {
			value = "$rpc_address$"
			description = "RPC host address"
			required = true
		}
		"-C" = {
			value = "$rpc_command$"
			description = "Programm name (or number)"
			required = true
		}
		"-p" = {
			value = "$rpc_port$"
			description = "RPC port"
		}
		"-c" = {
			value = "$rpc_version$"
			description = "The version to check"
		}
		"-u" = {
			set_if = "$rpc_udp$"
			description = "Test UDP"
		}
		"-t" = {
			set_if = "$rpc_tcp$"
			description	= "Test TCP"
		}
		"-v" = {
			set_if = "$rpc_verbose$"
			description = "Show verbose details"
		}
	}

	vars.rpc_address = "$check_address$"
}

object CheckCommand "uptime" {
        command = [ PluginDir + "/check_uptime" ]

        arguments = {
		"--warning" = {
			value = "$uptime_warning$"
			description = "Min. number of uptime to generate warning"
			required = true
		}
		"--critical" = {
			value = "$uptime_critical$"
			description = "Min. number of uptime to generate critical alert ( w < c )"
			required = true
		}
		"--for" = {
			set_if = "$uptime_for$"
			description = "Show uptime in a pretty format (Running for x weeks, x days, ...)"
		}
		"--since" = {
			set_if = "$uptime_since$"
			description = "Show last boot in yyyy-mm-dd HH:MM:SS format (output from 'uptime -s')"
		}
	}

	vars.uptime_warning = "30m"
	vars.uptime_critical = "15m"
}