File: global_settings.php

package info (click to toggle)
cacti 1.2.30%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 67,176 kB
  • sloc: php: 123,193; javascript: 29,825; sql: 2,595; xml: 1,823; sh: 1,228; perl: 194; makefile: 65; python: 51; ruby: 9
file content (2913 lines) | stat: -rw-r--r-- 117,409 bytes parent folder | download
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
<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2024 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDtool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 | http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

$dir = dir($config['base_path'] . '/include/themes/');
while (false !== ($entry = $dir->read())) {
	if ($entry != '.' && $entry != '..') {
		if (is_dir($config['base_path'] . '/include/themes/' . $entry)) {
			$themes[$entry] = __(ucwords($entry));
		}
	}
}
asort($themes);
$dir->close();

/* tab information */
$tabs = array(
	'general'        => __('General'),
	'path'           => __('Paths'),
	'snmp'           => __('Device Defaults'),
	'poller'         => __('Poller'),
	'data'           => __('Data'),
	'visual'         => __('Visual'),
	'authentication' => __('Authentication'),
	'boost'          => __('Performance'),
	'spikes'         => __('Spikes'),
	'mail'           => __('Mail/Reporting/DNS')
);

$tabs_graphs = array(
	'general'   => __('General Settings'),
	'timespan'  => __('Time Spanning/Shifting'),
	'thumbnail' => __('Graph Thumbnail Settings'),
	'tree'      => __('Tree Settings'),
	'fonts'     => __('Graph Fonts')
);

if (db_table_exists('plugin_config')) {
	$logplugins = array_rekey(db_fetch_assoc('SELECT directory AS id, name
		FROM plugin_config
		WHERE status = 1
		ORDER BY name'), 'id', 'name');
} else {
	$logplugins = array();
}

/* get the files for selective logging */
$realm_files  = array_keys($user_auth_realm_filenames);
$nohead_files = array_values($no_http_header_files);
foreach($realm_files as $file) {
	$logfiles[$file] = $file;
}

foreach($nohead_files as $file) {
	$logfiles[$file] = $file;
}

$logfiles['poller_realtime.php'] = 'poller_realtime.php';
$logfiles['cmd_realtime.php']    = 'cmd_realtime.php';

asort($logfiles);

$mail_methods = array(
	CACTI_MAIL_PHP      => __('PHP Mail() Function'),
	CACTI_MAIL_SENDMAIL => __('Sendmail'),
	CACTI_MAIL_SMTP     => __('SMTP')
);

if ($config['cacti_server_os'] == 'win32') {
	unset($mail_methods[CACTI_MAIL_SENDMAIL]);
}

/* cache the admin account */
$admin_account = '0';

if (isset($_SESSION['admin_account']) && isset($_SESSION['sess_user_id'])) {
	$admin_account = $_SESSION['admin_account'];
} elseif (isset($_SESSION['sess_user_id'])) {
	$admin_account = db_fetch_cell('SELECT value FROM settings WHERE name="admin_user"');

	if (!empty($admin_account)) {
		$_SESSION['admin_account'] = db_qstr($admin_account) . ', ' . $_SESSION['sess_user_id'];
	} else {
		$_SESSION['admin_account'] = $_SESSION['sess_user_id'];
	}
}

/* setting information */
$settings = array(
	'path' => array(
		'dependent_header' => array(
			'friendly_name' => __('Required Tool Paths'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'path_snmpwalk' => array(
			'friendly_name' => __('snmpwalk Binary Path'),
			'description' => __('The path to your snmpwalk binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'path_snmpget' => array(
			'friendly_name' => __('snmpget Binary Path'),
			'description' => __('The path to your snmpget binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'path_snmpbulkwalk' => array(
			'friendly_name' => __('snmpbulkwalk Binary Path'),
			'description' => __('The path to your snmpbulkwalk binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'path_snmpgetnext' => array(
			'friendly_name' => __('snmpgetnext Binary Path'),
			'description' => __('The path to your snmpgetnext binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'path_snmptrap' => array(
			'friendly_name' => __('snmptrap Binary Path'),
			'description' => __('The path to your snmptrap binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'path_rrdtool' => array(
			'friendly_name' => __('RRDtool Binary Path'),
			'description' => __('The path to the rrdtool binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'path_php_binary' => array(
			'friendly_name' => __('PHP Binary Path'),
			'description' => __('The path to your PHP binary file (may require a php recompile to get this file).'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255'
		),
		'logging_header' => array(
			'friendly_name' => __('Logging'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'path_cactilog' => array(
			'friendly_name' => __('Cacti Log Path'),
			'description' => __('The path to your Cacti log file (if blank, defaults to &lt;path_cacti&gt;/log/cacti.log)'),
			'method' => 'filepath',
			'file_type' => 'ascii',
			'default' => $config['base_path'] . '/log/cacti.log',
			'max_length' => '255',
			'install_check' => 'writable',
			'install_blank' => true
		),
		'path_stderrlog' => array(
			'friendly_name' => __('Poller Standard Error Log Path'),
			'description' => __('If you are having issues with Cacti\'s Data Collectors, set this file path and the Data Collectors standard error will be redirected to this file'),
			'method' => 'filepath',
			'file_type' => 'ascii',
			'default' => $config['base_path'] . '/log/cacti_stderr.log',
			'max_length' => '255',
			'install_check' => 'writable',
			'install_optional' => true
		),
		'logrotate_enabled' => array(
			'friendly_name' => __('Rotate the Cacti Log'),
			'description' => __('This option will rotate the Cacti Log periodically.'),
			'method' => 'checkbox',
			'default' => 'on',
		),
		'logrotate_frequency' => array(
			'friendly_name' => __('Rotation Frequency'),
			'description' => __('At what frequency would you like to rotate your logs?'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => $logrotate_frequency
		),
		'logrotate_retain' => array(
			'friendly_name' => __('Log Retention'),
			'description' => __('How many log files do you wish to retain?  Use 0 to never remove any logs. (0-365)'),
			'method' => 'textbox',
			'default' => '7',
			'max_length' => 3,
			'size' => 4
		),
		'pollerpaths_header' => array(
			'friendly_name' => __('Alternate Poller Path'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'path_spine' => array(
			'friendly_name' => __('Spine Binary File Location'),
			'description' => __('The path to Spine binary.'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => '255',
			'install_optional' => true,
		),
		'path_spine_config' => array(
			'friendly_name' => __('Spine Config File Path'),
			'description' => __('The path to Spine configuration file.  By default, in the cwd of Spine, or /etc if not specified.'),
			'method' => 'filepath',
			'file_type' => 'ascii',
			'max_length' => '255',
			'install_optional' => true,
		),
		'rrdclean_header' => array(
			'friendly_name' => __('RRD Cleaner'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'rrd_autoclean' => array(
			'friendly_name' => __('RRDfile Auto Clean'),
			'description' => __('Automatically archive or delete RRDfiles when their corresponding Data Sources are removed from Cacti'),
			'method' => 'checkbox',
			'default' => ''
 		),
		'rrd_autoclean_method' => array(
			'friendly_name' => __('RRDfile Auto Clean Method'),
			'description' => __('The method used to Clean RRDfiles from Cacti after their Data Sources are deleted.'),
			'method' => 'drop_array',
			'array' => array(
				'1' => __('Delete'),
				'3' => __('Archive')
			),
			'default' => '1'
 		),
		'rrd_archive' => array(
			'friendly_name' => __('Archive directory'),
			'description' => __('This is the directory where RRDfiles are <strong>moved</strong> for archiving'),
			'method' => 'dirpath',
			'default' => $config['base_path'] . '/rra/archive/',
			'max_length' => 255,
		),
	),
	'general' => array(
		'poller_specific_header' => array(
			'friendly_name' => __('Log Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'log_destination' => array(
			'friendly_name' => __('Log Destination'),
			'description' => __('How will Cacti handle event logging.'),
			'method' => 'drop_array',
			'default' => 1,
			'array' => $logfile_options,
		),
		'log_verbosity' => array(
			'friendly_name' => __('Generic Log Level'),
			'description' => __('What level of detail do you want sent to the log file.  WARNING: Leaving in any other status than NONE or LOW can exhaust your disk space rapidly.'),
			'method' => 'drop_array',
			'default' => POLLER_VERBOSITY_LOW,
			'array' => $logfile_verbosity,
		),
		'log_validation' => array(
			'friendly_name' => __('Log Input Validation Issues'),
			'description' => __('Record when request fields are accessed without going through proper input validation'),
			'method' => 'checkbox',
			'default' => ''
		),
		'data_source_trace' => array(
			'friendly_name' => __('Data Source Tracing'),
			'description' => __('A developer only option to trace the creation of Data Sources mainly around checks for uniqueness'),
			'method' => 'checkbox',
			'default' => ''
		),
		'selective_debug' => array(
			'friendly_name' => __('Selective File Debug'),
			'description' => __('Select which files you wish to place in Debug mode regardless of the Generic Log Level setting.  Any files selected will be treated as they are in Debug mode.'),
			'method' => 'drop_multi',
			'array' => $logfiles,
			'default' => ''
		),
		'selective_plugin_debug' => array(
			'friendly_name' => __('Selective Plugin Debug'),
			'description' => __('Select which Plugins you wish to place in Debug mode regardless of the Generic Log Level setting.  Any files used by this plugin will be treated as they are in Debug mode.'),
			'method' => 'drop_multi',
			'array' => $logplugins,
			'default' => ''
		),
		'selective_device_debug' => array(
			'friendly_name' => __('Selective Device Debug'),
			'description' => __('A comma delimited list of Device ID\'s that you wish to be in Debug mode during data collection.  This Debug level is only in place during the Cacti polling process.'),
			'method' => 'textbox',
			'size' => '30',
			'max_length' => 30,
			'default' => ''
		),
		'poller_log' => array(
			'friendly_name' => __('Syslog/Eventlog Item Selection'),
			'description' => __('When using Syslog/Eventlog for logging, the Cacti log messages that will be forwarded to the Syslog/Eventlog.'),
			'method' => 'checkbox_group',
			'tab' => 'poller',
			'items' => array(
				'log_pstats' => array(
					'friendly_name' => __('Statistics'),
					'default' => ''
				),
				'log_pwarn' => array(
					'friendly_name' => __('Warnings'),
					'default' => ''
				),
				'log_perror' => array(
					'friendly_name' => __('Errors'),
					'default' => 'on'
				)
			)
		),
		'i18n_header' => array(
			'friendly_name' => __('Internationalization (i18n)'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'i18n_language_support' => array(
			'friendly_name' => __('Language Support'),
			'description' => __('Choose \'enabled\' to allow the localization of Cacti. The strict mode requires that the requested language will also be supported by all plugins being installed at your system. If that\'s not the fact everything will be displayed in English.'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => $i18n_modes
		),
		'i18n_default_language' => array(
			'friendly_name' => __('Language'),
			'description' => __('Default language for this system.'),
			'method' => 'drop_language',
			'default' => 'en-US',
			'array' => get_installed_locales()
		),
		'i18n_auto_detection' => array(
			'friendly_name' => __('Auto Language Detection'),
			'description' => __('Allow to automatically determine the \'default\' language of the user and provide it at login time if that language is supported by Cacti. If disabled, the default language will be in force until the user elects another language.'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => array(
				'0' => __('Disabled'),
				'1' => __('Enabled')
			)
		),
		'i18n_language_handler' => array(
			'friendly_name' => __('Preferred Language Processor'),
			'description' => __('Cacti includes support for multiple alternate Language Translation Processors.  If none is selected Cacti will attempt to use the first one found.'),
			'method' => 'drop_array',
			'default' => CACTI_LANGUAGE_HANDLER_DEFAULT,
			'array' => $i18n_supported_languages
		),
		'client_timezone_support' => array(
			'friendly_name' => __('Client TimeZone Support'),
			'description' => __('How should Cacti support Client Dates based upon the Client browsers timezone.'),
			'method' => 'drop_array',
			'array' => array(
				'0' => __('Disabled'),
				'1' => __('Enabled')
			),
			'default' => '0'
		),
		'default_date_format' => array(
			'friendly_name' => __('Date Display Format'),
			'description' => __('The System default date format to use in Cacti.'),
			'method' => 'drop_array',
			'array' => $dateformats,
			'default' => GD_Y_MO_D
		),
		'default_datechar' => array(
			'friendly_name' => __('Date Separator'),
			'description' => __('The System default date separator to be used in Cacti.'),
			'method' => 'drop_array',
			'array' => $datechar,
			'default' => GDC_HYPHEN
		),
		'other1_header' => array(
			'friendly_name' => __('Other Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'site_location_filter' => array(
			'friendly_name' => __('Show only site specific locations'),
			'description' => __('Show only locations that are available at a devices selected site.'),
			'method' => 'checkbox',
			'default' => '',
		),
		'default_has' => array(
			'friendly_name' => __('Has Graphs/Data Sources Checked'),
			'description' => __('Should the Has Graphs and Has Data Sources be Checked by Default.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'rrdtool_version' => array(
			'friendly_name' => __('RRDtool Version'),
			'description' => __('The version of RRDtool that you have installed.'),
			'method' => 'drop_array',
			'default' => '1.4.0',
			'array' => $rrdtool_versions,
		),
		'enable_rrdtool_gradient_support' => array(
			'friendly_name' => __('Enable Gradient Support'),
			'description' => __('Enabled Gradient Support for AREA and STACK charts.'),
			'default' => '',
			'method' => 'checkbox',
		),
		'graph_auth_method' => array(
			'friendly_name' => __('Graph Permission Method'),
			'description' => __('There are four methods for determining a User\'s Graph Permissions.  The first is \'Permissive\'.  Under the \'Permissive\' setting, a User only needs access to either the Graph, Device or Graph Template to gain access to the Graphs that apply to them.  Under \'Restrictive\', the User must have access to the Graph, the Device, and the Graph Template to gain access to the Graph.  These first two methods have scalability problems for very large installs.  So, two additional options are available.  They are \'Device Based\', which means if you have access to the Device, you get access to it\'s Graphs.  And lastly \'Graph Template Based\', which means if you have access to the \'Graph Template\' you get access to all Device Graphs of that Template.'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => array(
				'1' => __('Permissive'),
				'2' => __('Restrictive'),
				'3' => __('Device Based'),
				'4' => __('Graph Template Based'),
			)
		),
		'grds_creation_method' => array(
			'method' => 'drop_array',
			'friendly_name' => __('Graph/Data Source Creation Method'),
			'description' => __('If set to Simple, Graphs and Data Sources can only be created from New Graphs.  If Advanced, legacy Graph and Data Source creation is supported.'),
			'default' => '0',
			'array' => array(
				'0' => __('Simple'),
				'1' => __('Advanced')
			)
		),
		'hide_form_description' => array(
			'friendly_name' => __('Show Form/Setting Help Inline'),
			'description' => __('When checked, Form and Setting Help will be show inline.  Otherwise it will be presented when hovering over the help button.'),
			'default' => '',
			'method' => 'checkbox',
		),
		'local_documentation' => array(
			'friendly_name' => __('Local Page Help Only'),
			'description' => __('By default Cacti page help is located at docs.cacti.net.  However, if your system does not have access to the Internet, you may download the documentation locally in HTML format and host it in the \'docs\' location of you Cacti server.  If you choose only to leverage the local location for page help documentation, check this checkbox.'),
			'default' => '',
			'method' => 'checkbox',
		),
		'deletion_verification' => array(
			'friendly_name' => __('Deletion Verification'),
			'description' => __('Prompt user before item deletion.'),
			'default' => 'on',
			'method' => 'checkbox',
		),
		'ds_preselected_delete' => array(
			'friendly_name' => __('Data Source Preservation Preset'),
			'description' => __('When enabled, Cacti will set Radio Button to Delete related Data Sources of a Graph when removing Graphs.  Note: Cacti will not allow the removal of Data Sources if they are used in other Graphs.'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'graphs_auto_unlock' => array(
			'friendly_name' => __('Graphs Auto Unlock'),
			'description' => __('When enabled, Cacti will not lock Graphs.  This allow a faster manual modification of Data Sources related to a Graph.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'hide_console' => array(
			'friendly_name' => __('Hide Cacti Dashboard'),
			'description' => __('For use with Cacti\'s External Link Support.  Using this setting, you can hide the Cacti Dashboard, so you can display just your own page.'),
			'default' => '',
			'method' => 'checkbox'
		),
		'drag_and_drop' => array(
			'friendly_name' => __('Enable Drag-N-Drop'),
			'description' => __('Some of Cacti\'s interfaces support Drag-N-Drop.  If checked this option will be enabled.  Note: For visually impaired user, this option may be disabled.'),
			'method' => 'checkbox',
			'default' => 'on',
		),
		'security_header' => array(
			'friendly_name' => __('Site Security'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'force_https' => array(
			'friendly_name' => __('Force Connections over HTTPS'),
			'description' => __('When checked, any attempts to access Cacti will be redirected to HTTPS to ensure high security.'),
			'default' => '',
			'method' => 'checkbox',
		),
		'content_security_policy_script' => array(
			'method' => 'drop_array',
			'friendly_name' => __('Content-Security Allow Unsafe JavaScript eval() calls'),
			'description' => __('Certain Cacti plugins require the use of unsafe JavaScript eval() calls.  If you select this option, they will be allowed in Cacti.'),
			'default' => '',
			'array' => array(
				'0'           => __('No'),
				'unsafe-eval' => __('Yes')
			)
		),
		'content_security_alternate_sources' => array(
			'friendly_name' => __('Content-Security Alternate Sources'),
			'description' => __('Space delimited domain names that will be permitted to be accessed outside of the Web Server itself.  This is important for users choosing to use a CDN, or hosting site.  Sources can includes wildcards for example: *.mydomain.com, or a protocol, for example: https://*.example.com.  These Alternate Sources include Image, CSS and JavaScript types only.'),
			'method' => 'textbox',
			'default' => '',
			'size' => '100',
			'max_length' => '255',
		),
		'automation_header' => array(
			'friendly_name' => __('Automation'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'automation_graphs_enabled' => array(
			'method' => 'checkbox',
			'friendly_name' => __('Enable Automatic Graph Creation'),
			'description' => __('When disabled, Cacti Automation will not actively create any Graph.  This is useful when adjusting Device settings so as to avoid creating new Graphs each time you save an object.  Invoking Automation Rules manually will still be possible.'),
			'default' => 'on',
		),
		'automation_tree_enabled' => array(
			'method' => 'checkbox',
			'friendly_name' => __('Enable Automatic Tree Item Creation'),
			'description' => __('When disabled, Cacti Automation will not actively create any Tree Item.  This is useful when adjusting Device or Graph settings so as to avoid creating new Tree Entries each time you save an object.  Invoking Rules manually will still be possible.'),
			'default' => 'on',
		),
		'automation_email' => array(
			'friendly_name' => __('Automation Notification To Email'),
			'description' => __('The Email Address to send Automation Notification Emails to if not specified at the Automation Network level.  If either this field, or the Automation Network value are left blank, Cacti will use the Primary Cacti Admins Email account.'),
			'method' => 'textbox',
			'default' => '',
			'max_length' => '128',
		),
		'automation_fromname' => array(
			'friendly_name' => __('Automation Notification From Name'),
			'description' => __('The Email Name to use for Automation Notification Emails to if not specified at the Automation Network level.  If either this field, or the Automation Network value are left blank, Cacti will use the system default From Name.'),
			'method' => 'textbox',
			'default' => '',
			'max_length' => '32',
			'size' => '30'
		),
		'automation_fromemail' => array(
			'friendly_name' => __('Automation Notification From Email'),
			'description' => __('The Email Address to use for Automation Notification Emails to if not specified at the Automation Network level.  If either this field, or the Automation Network value are left blank, Cacti will use the system default From Email Address.'),
			'method' => 'textbox',
			'default' => '',
			'max_length' => '100',
		),
		'other_header' => array(
			'friendly_name' => __('Graph Template Defaults'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'default_test_source' => array(
			'method' => 'checkbox',
			'friendly_name' => __('Graph Template Test Data Source'),
			'description' => __('Check this checkbox if you wish to test the Data Sources prior to their creation for new and newly imported Graph Templates.  With Test Data Sources enabled, if the Data Source does not return valid data, the Graph will not be created.  This setting is important if you wish to have a more generic Device Template that can include more Graph Templates that can be selectively applied depending on the characteristics of the Device itself.  Note: If you have a long running script as a Data Source, the time to create Graphs will be increased.'),
			'default' => '',
			),
		'default_image_format' => array(
			'friendly_name' => __('Graph Template Image Format'),
			'description' => __('The default Image Format to be used for all new Graph Templates.'),
			'method' => 'drop_array',
			'default' => '3',
			'array' => $image_types,
		),
		'default_graph_height' => array(
			'friendly_name' => __('Graph Template Height'),
			'description' => __('The default Graph Height to be used for all new Graph Templates.'),
			'method' => 'textbox',
			'default' => '200',
			'size' => '5',
			'max_length' => '5'
		),
		'default_graph_width' => array(
			'friendly_name' => __('Graph Template Width'),
			'description' => __('The default Graph Width to be used for all new Graph Templates.'),
			'method' => 'textbox',
			'default' => '700',
			'size' => '5',
			'max_length' => '5'
		)
	),
	'snmp' => array(
		'general_header' => array(
			'friendly_name' => __('General Defaults'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'default_template' => array(
			'friendly_name' => __('Template'),
			'description' => __('The default Device Template used on all new Devices.'),
			'method' => 'drop_sql',
			'default' => '',
			'none_value' => __('None'),
			'sql' => 'SELECT id, name FROM host_template ORDER BY name',
		),
		'default_site' => array(
			'friendly_name' => __('Site'),
			'description' => __('The default Site for all new Devices.'),
			'method' => 'drop_sql',
			'default' => '1',
			'none_value' => __('None'),
			'sql' => 'SELECT id, name FROM sites ORDER BY name',
		),
		'default_poller' => array(
			'friendly_name' => __('Poller'),
			'description' => __('The default Poller for all new Devices.'),
			'method' => 'drop_sql',
			'default' => '1',
			'none_value' => __('None'),
			'sql' => 'SELECT id, name FROM poller ORDER BY name',
		),
		'device_threads' => array(
			'friendly_name' => __('Device Threads'),
			'description' => __('The default number of Device Threads.  This is only applicable when using the Spine Data Collector.'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => array(
				1  => __('%s Thread', 1),
				2  => __('%s Threads', 2),
				3  => __('%s Threads', 3),
				4  => __('%s Threads', 4),
				5  => __('%s Threads', 5),
				6  => __('%s Threads', 6),
				7  => __('%s Threads', 7),
				8  => __('%s Threads', 8),
				9  => __('%s Threads', 9),
				10 => __('%s Threads', 10)
			)
		),
		'reindex_method' => array(
			'friendly_name' => __('Re-index Method for Data Queries'),
			'description' => __('The default Re-index Method to use for all Data Queries.'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => $reindex_types,
		),
		'default_interface_speed' => array(
			'friendly_name' => __('Default Interface Speed'),
			'description' => __('If Cacti can not determine the interface speed due to either ifSpeed or ifHighSpeed not being set or being zero, what maximum value do you wish on the resulting RRDfiles.'),
			'method' => 'drop_array',
			'default' => '1000',
			'array' => array(
				'100'    => __('100 Mbps Ethernet'),
				'1000'   => __('1 Gbps Ethernet'),
				'10000'  => __('10 Gbps Ethernet'),
				'25000'  => __('25 Gbps Ethernet'),
				'40000'  => __('40 Gbps Ethernet'),
				'56000'  => __('56 Gbps Ethernet'),
				'100000' => __('100 Gbps Ethernet')
			)
		),
		'snmp_header' => array(
			'friendly_name' => __('SNMP Defaults'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'snmp_version' => array(
			'friendly_name' => __('Version'),
			'description' => __('Default SNMP version for all new Devices.'),
			'method' => 'drop_array',
			'default' => '2',
			'array' => $snmp_versions,
		),
		'snmp_community' => array(
			'friendly_name' => __('Community'),
			'description' => __('Default SNMP read community for all new Devices.'),
			'method' => 'textbox',
			'default' => 'public',
			'max_length' => '100',
		),
		'snmp_security_level' => array(
			'friendly_name' => __('Security Level'),
			'description' => __('Default SNMP v3 Security Level for all new Devices.'),
			'method' => 'drop_array',
			'default' => 'authPriv',
			'array' => $snmp_security_levels,
		),
		'snmp_auth_protocol' => array(
			'method' => 'drop_array',
			'friendly_name' => __('Auth Protocol (v3)'),
			'description' => __('Default SNMPv3 Authorization Protocol for all new Devices.'),
			'default' => 'MD5',
			'array' => $snmp_auth_protocols,
		),
		'snmp_username' => array(
			'friendly_name' => __('Auth User (v3)'),
			'description' => __('Default SNMP v3 Authorization User for all new Devices.'),
			'method' => 'textbox',
			'default' => '',
			'max_length' => '50',
			'size' => '40'
		),
		'snmp_password' => array(
			'friendly_name' => __('Auth Passphrase (v3)'),
			'description' => __('Default SNMP v3 Authorization Passphrase for all new Devices.'),
			'method' => 'textbox_password',
			'default' => '',
			'max_length' => '50',
			'size' => '40'
		),
		'snmp_priv_protocol' => array(
			'method' => 'drop_array',
			'friendly_name' => __('Privacy Protocol (v3)'),
			'description' => __('Default SNMPv3 Privacy Protocol for all new Devices.'),
			'default' => 'DES',
			'array' => $snmp_priv_protocols,
		),
		'snmp_priv_passphrase' => array(
			'method' => 'textbox_password',
			'friendly_name' => __('Privacy Passphrase (v3)'),
			'description' => __('Default SNMPv3 Privacy Passphrase for all new Devices.'),
			'default' => '',
			'max_length' => '200',
			'size' => '80'
		),
		'snmp_context' => array(
			'method' => 'textbox',
			'friendly_name' => __('SNMP Context (v3)'),
			'description' => __('Enter the SNMP v3 Context for all new Devices.'),
			'value' => '|arg1:snmp_context|',
			'default' => '',
			'max_length' => '64',
			'size' => '40'
		),
		'snmp_engine_id' => array(
			'method' => 'textbox',
			'friendly_name' => __('SNMP Engine ID (v3)'),
			'description' => __('Default SNMP v3 Engine Id for all new Devices. Leave this field empty to use the SNMP Engine ID being defined per SNMPv3 Notification receiver.'),
			'value' => '|arg1:snmp_engine_id|',
			'default' => '',
			'max_length' => '64',
			'size' => '40'
		),
		'snmp_port' => array(
			'friendly_name' => __('Port Number'),
			'description' => __('Default UDP Port for all new Devices.  Typically 161.'),
			'method' => 'textbox',
			'default' => '161',
			'max_length' => '10',
			'size' => '5'
		),
		'snmp_timeout' => array(
			'friendly_name' => __('Timeout'),
			'description' => __('Default SNMP timeout in milli-seconds for all new Devices.'),
			'method' => 'textbox',
			'default' => '500',
			'max_length' => '10',
			'size' => '5'
		),
		'snmp_retries' => array(
			'friendly_name' => __('Retries'),
			'description' => __('Default SNMP retries for all new Devices.'),
			'method' => 'textbox',
			'default' => '3',
			'max_length' => '10',
			'size' => '5'
		),
		'availability_header' => array(
			'friendly_name' => __('Availability/Reachability'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'availability_method' => array(
			'friendly_name' => __('Downed Device Detection'),
			'description' => __('Default Availability/Reachability for all new Devices.  The method Cacti will use to determine if a Device is available for polling.  <br><i>NOTE: It is recommended that, at a minimum, SNMP always be selected.</i>'),
			'method' => 'drop_array',
			'default' => AVAIL_SNMP,
			'array' => $availability_options,
		),
		'ping_method' => array(
			'friendly_name' => __('Ping Type'),
			'description' => __('Default Ping type for all new Devices.</i>'),
			'method' => 'drop_array',
			'default' => PING_UDP,
			'array' => $ping_methods,
		),
		'ping_port' => array(
			'friendly_name' => __('Ping Port'),
			'description' => __('Default Ping Port for all new Devices.  With TCP, Cacti will attempt to Syn the port.  With UDP, Cacti requires either a successful connection, or a \'port not reachable\' error to determine if the Device is up or not.'),
			'method' => 'textbox',
			'default' => '23',
			'max_length' => '10',
			'size' => '5'
		),
		'ping_timeout' => array(
			'friendly_name' => __('Ping Timeout Value'),
			'description' => __('Default Ping Timeout value in milli-seconds for all new Devices.  The timeout values to use for Device SNMP, ICMP, UDP and TCP pinging.  ICMP Pings will be rounded up to the nearest second.  TCP and UDP connection timeouts on Windows are controlled by the operating system, and are therefore not recommended on Windows.'),
			'method' => 'textbox',
			'default' => '400',
			'max_length' => '10',
			'size' => '5'
		),
		'ping_retries' => array(
			'friendly_name' => __('Ping Retry Count'),
			'description' => __('The number of times Cacti will attempt to ping a Device before marking it as down.'),
			'method' => 'textbox',
			'default' => '1',
			'max_length' => '10',
			'size' => '5'
		),
		'updown_header' => array(
			'friendly_name' => __('Up/Down Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'ping_failure_count' => array(
			'friendly_name' => __('Failure Count'),
			'description' => __('The number of polling intervals a Device must be down before logging an error and reporting Device as down.'),
			'method' => 'textbox',
			'default' => '2',
			'max_length' => '10',
			'size' => '5'
		),
		'ping_recovery_count' => array(
			'friendly_name' => __('Recovery Count'),
			'description' => __('The number of polling intervals a Device must remain up before returning Device to an up status and issuing a notice.'),
			'method' => 'textbox',
			'default' => '3',
			'max_length' => '10',
			'size' => '5'
			)
	),
	'visual' => array(
		'themes_header' => array(
			'friendly_name' => __('Theme Settings'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'selected_theme' => array(
			'friendly_name' => __('Theme'),
			'description' => __('Please select one of the available Themes to skin your Cacti with.'),
			'method' => 'drop_array',
			'default' => 'modern',
			'array' => $themes
		),
		'table_header' => array(
			'friendly_name' => __('Table Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'num_rows_table' => array(
			'friendly_name' => __('Rows Per Page'),
			'description' => __('The default number of rows to display on for a table.'),
			'method' => 'drop_array',
			'default' => '30',
			'array' => $item_rows
		),
		'autocomplete_enabled' => array(
			'friendly_name' => __('Autocomplete Enabled'),
			'description' => __('In very large systems, select lists can slow the user interface significantly.  If this option is enabled, Cacti will use autocomplete callbacks to populate the select list systematically.  Note: autocomplete is forcibly disabled on the Classic theme.'),
			'method' => 'drop_array',
			'default' => '1',
			'array' => array(
				1 => __('Yes'),
				0 => __('No')
			)
		),
		'autocomplete_rows' => array(
			'friendly_name' => __('Autocomplete Rows'),
			'description' => __('The default number of rows to return from an autocomplete based select pattern match.') . ' ' . __('.  This is limited by the php setting \'max_input_vars\', currently:') .  ' ' . ini_get('max_input_vars'),
			'method' => 'drop_array',
			'default' => '30',
			'array' => $item_rows
		),
		'tree_header' => array(
			'friendly_name' => __('Tree Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'min_tree_width' => array(
			'friendly_name' => __('Minimum Tree Width'),
			'description' => __('The Minimum width of the Tree to contract to.'),
			'method' => 'textbox',
			'default' => '170',
			'max_length' => '5',
			'size' => '7'
		),
		'max_tree_width' => array(
			'friendly_name' => __('Maximum Tree Width'),
			'description' => __('The Maximum width of the Tree to expand to, after which time, Tree branches will scroll on the page.') . ' ' . __( '.  This is limited by the php setting \'max_input_vars\', currently:') .  ' ' . ini_get('max_input_vars'),
			'method' => 'textbox',
			'default' => '300',
			'max_length' => '5',
			'size' => '7'
		),
		'filter_header' => array(
			'friendly_name' => __('Filter Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'strip_domain' => array(
			'friendly_name' => __('Strip Domains from Device Dropdowns'),
			'description' => __('When viewing Device name filter dropdowns, checking this option will strip to domain from the hostname.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'object_creation_header' => array(
			'friendly_name' => __('Graph/Data Source/Data Query Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'max_title_length' => array(
			'friendly_name' => __('Maximum Title Length'),
			'description' => __('The maximum allowable Graph or Data Source titles.'),
			'method' => 'textbox',
			'default' => '110',
			'max_length' => '10',
			'size' => '5'
		),
		'max_data_query_field_length' => array(
			'friendly_name' => __('Data Source Field Length'),
			'description' => __('The maximum Data Query field length.'),
			'method' => 'textbox',
			'default' => '40',
			'max_length' => '10',
			'size' => '5'
		),
		'graphs_new_header' => array(
			'friendly_name' => __('Graph Creation'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'default_graphs_new_dropdown' => array(
			'friendly_name' => __('Default Graph Type'),
			'description' => __('When creating graphs, what Graph Type would you like pre-selected?'),
			'method' => 'drop_array',
			'default' => '-2',
			'array' => array(
				'-2' => __('All Types'),
				'-1' => __('By Template/Data Query')
			)
		),
		'logmgmt_header' => array(
			'friendly_name' => __('Log Management'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'num_rows_log' => array(
			'friendly_name' => __('Default Log Tail Lines'),
			'description' => __('Default number of lines of the Cacti log file to tail.'),
			'method' => 'drop_array',
			'default' => 500,
			'array' => $log_tail_lines,
		),
		'max_display_rows' => array(
			'friendly_name' => __('Maximum number of rows per page'),
			'description' => __('User defined number of lines for the CLOG to tail when selecting \'All lines\'.'),
			'method' => 'textbox',
			'max_length' => 5,
			'size' => 5,
			'default' => 1000
		),
		'log_refresh_interval' => array(
			'friendly_name' => __('Log Tail Refresh'),
			'description' => __('How often do you want the Cacti log display to update.'),
			'method' => 'drop_array',
			'default' => 60,
			'array' => $page_refresh_interval,
		),
		'clog_header' => array(
			'friendly_name' => __('Log Viewer Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'clog_exclude' => array(
			'friendly_name' => __('Exclusion Regex'),
			'description' => __('Any strings that match this regex will be excluded from the user display.  <strong>For example, if you want to exclude all log lines that include the words \'Admin\' or \'Login\' you would type \'(Admin || Login)\'</strong>'),
			'method' => 'textarea',
			'textarea_rows' => '4',
			'textarea_cols' => '80',
			'max_length' => 512
		),
		'realtime_header' => array(
			'friendly_name' => __('Real-time Graphs'),
			'method' => 'spacer',
			'collapsible' => 'true',
		),
		'realtime_enabled' => array(
			'friendly_name' => __('Enable Real-time Graphing'),
			'description' => __('When an option is checked, users will be able to put Cacti into Real-time mode.'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'realtime_gwindow' => array(
			'friendly_name' => __('Graph Timespan'),
			'description' => __('This timespan you wish to see on the default graph.'),
			'method' => 'drop_array',
			'default' => 60,
			'array' => $realtime_window,
		),
		'realtime_interval' => array(
			'friendly_name' => __('Minimum Refresh Interval'),
			'description' => __('This is the minimal supported time between Graph updates.  This value is also used to set certain RRDfile attributes.  If you have a Device that caches data and does not provide realtime updates, you may have to increase the default Minimum Refresh Interval to prevent creating Graphs with gaps.'),
			'method' => 'drop_array',
			'default' => 10,
			'array' => $realtime_refresh,
		),
		'realtime_cache_path' => array(
			'friendly_name' => __('Cache Directory'),
			'description' => __('This is the location, on the web server where the RRDfiles and PNG files will be cached.  This cache will be managed by the poller.  Make sure you have the correct read and write permissions on this folder'),
			'method' => 'dirpath',
			'default' => $config['base_path'] . '/cache/realtime/',
			'max_length' => 255,
			'size' => 40,
		),
		'rrdtool_header' => array(
			'friendly_name' => __('RRDtool Graph Options'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'graph_watermark' => array(
			'friendly_name' => __('Custom Watermark'),
			'description' => __('Text placed at the bottom center of every Graph.'),
			'method' => 'textbox',
			'default' => 'Generated by Cacti®',
			'max_length' => '80',
			'size' => '60'
		),
		'graph_dateformat' => array(
			'friendly_name' => __('Custom Date Format'),
			'description' => __('To be used when formatting |date_time| on a graph'),
			'method' => 'textbox',
			'default' => 'D d M H:i:s T Y',
			'max_length' => '80',
			'size' => '60'
		),
		'rrdtool_watermark' => array(
			'friendly_name' => __('Disable RRDtool Watermark'),
			'description' => __('Provided your RRDtool version supports it, you may disable RRDtool advertisement on your Graphs by checking this option.'),
			'method' => 'checkbox',
			'default' => '',
		),
		'font_method' => array(
			'friendly_name' => __('Font Selection Method'),
			'description' => __('How do you wish fonts to be handled by default?'),
			'method' => 'drop_array',
			'default' => 1,
			'array' => array(
				0 => __('System'),
				1 => __('Theme')
			)
		),
		'path_rrdtool_default_font' => array(
			'friendly_name' => __('Default Font'),
			'description' =>  __('When not using Theme based font control, the Pangon font-config font name to use for all Graphs. Optionally, you may leave blank and control font settings on a per object basis.'),
			'method' => 'font',
			'placeholder' =>  __('Enter Valid Font Config Value'),
			'max_length' => '255'
		),
		'title_size' => array(
			'friendly_name' => __('Title Font Size'),
			'description' => __('The size of the font used for Graph Titles'),
			'method' => 'textbox',
			'default' => '10',
			'max_length' => '10',
			'size' => '5'
		),
		'title_font' => array(
			'friendly_name' => __('Title Font Setting'),
			'description' => __('The font to use for Graph Titles.  Enter either a valid True Type Font file or valid Pango font-config value.'),
			'method' => 'font',
			'placeholder' => __('Enter Valid Font Config Value'),
			'max_length' => '100'
		),
		'legend_size' => array(
			'friendly_name' => __('Legend Font Size'),
			'description' => __('The size of the font used for Graph Legend items'),
			'method' => 'textbox',
			'default' => '8',
			'max_length' => '10',
			'size' => '5'
		),
		'legend_font' => array(
			'friendly_name' => __('Legend Font Setting'),
			'description' => __('The font to use for Graph Legends.  Enter either a valid True Type Font file or valid Pango font-config value.'),
			'method' => 'font',
			'placeholder' => __('Enter Valid Font Config Value'),
			'max_length' => '100'
		),
		'axis_size' => array(
			'friendly_name' => __('Axis Font Size'),
			'description' => __('The size of the font used for Graph Axis'),
			'method' => 'textbox',
			'default' => '7',
			'max_length' => '10',
			'size' => '5'
		),
		'axis_font' => array(
			'friendly_name' => __('Axis Font Setting'),
			'description' => __('The font to use for Graph Axis items.  Enter either a valid True Type Font file or valid Pango font-config value.'),
			'method' => 'font',
			'placeholder' => __('Enter Valid Font Config Value'),
			'max_length' => '100'
		),
		'unit_size' => array(
			'friendly_name' => __('Unit Font Size'),
			'description' => __('The size of the font used for Graph Units'),
			'method' => 'textbox',
			'default' => '7',
			'max_length' => '10',
			'size' => '5'
		),
		'unit_font' => array(
			'friendly_name' => __('Unit Font Setting'),
			'description' => __('The font to use for Graph Unit items.  Enter either a valid True Type Font file or valid Pango font-config value.'),
			'method' => 'font',
			'placeholder' => __('Enter Valid Font Config Value'),
			'max_length' => '100'
			),
		'business_hours_header' => array(
			'friendly_name' => __('Business Hours Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
			),
		'business_hours_start' => array(
			'friendly_name' => __('Start of Business Day'),
			'description' => __('The time your business hours start. Format: hh:mm'),
			'method' => 'textbox',
			'default' => '08:00',
			'max_length' => '5',
			'size' => '60'
			),
		'business_hours_end' => array(
			'friendly_name' => __('End of Business Day'),
			'description' => __('The time your business hours end. Format: hh:mm'),
			'method' => 'textbox',
			'default' => '18:00',
			'max_length' => '6',
			'size' => '60'
			),
		'business_hours_hideWeekends' => array(
			'friendly_name' => __('Hide Weekends'),
			'description' => __('Only show business hours during weekdays.'),
			'method' => 'checkbox',
			'default' => '',
			),
		'business_hours_enable' => array(
			'friendly_name' => __('Show business hours'),
			'description' => __('Display business hours on rrd graphs.'),
			'method' => 'checkbox',
			'default' => '',
			),
		'business_hours_color' => array(
			'friendly_name' => __('Color to use for business hours'),
			'description' => __('The color to be shown for business hours'),
			'method' => 'textbox',
			'default' => 'ccccccff',
			'max_length' => '8',
			'size' => '60'
		),
        'business_hours_max_days' => array(
            'friendly_name' => __('Maximum number of days to show business hours'),
            'description' => __('After this number of days, the business hours will not be added to the graph. <br/>Recommended: 62 days'),
            'method' => 'textbox',
            'default' => '62',
            'max_length' => '3',
            'size' => '60'
        )

	),
	'poller' => array(
		'poller_header' => array(
			'friendly_name' => __('General'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'poller_enabled' => array(
			'friendly_name' => __('Data Collection Enabled'),
			'description' => __('If you wish to stop the polling process completely, uncheck this box.'),
			'method' => 'checkbox',
			'default' => 'on',
			'tab' => 'poller'
		),
		'enable_snmp_agent' => array(
			'friendly_name' => __('SNMP Agent Support Enabled'),
			'description' => __('If this option is checked, Cacti will populate SNMP Agent tables with Cacti device and system information.  It does not enable the SNMP Agent itself.'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'poller_type' => array(
			'friendly_name' => __('Poller Type'),
			'description' => __('The poller type to use.  This setting will take affect at next polling interval.'),
			'method' => 'drop_array',
			'default' => 1,
			'array' => $poller_options,
		),
		'poller_sync_interval' => array(
			'friendly_name' => __('Poller Sync Interval'),
			'description' => __('The default polling sync interval to use when creating a poller.  This setting will affect how often remote pollers are checked and updated.'),
			'method' => 'drop_array',
			'default' => 7200,
			'array' => $poller_sync_intervals,
		),
		'poller_interval' => array(
			'friendly_name' => __('Poller Interval'),
			'description' => __('The polling interval in use.  This setting will affect how often RRDfiles are checked and updated.  <strong><u>NOTE: If you change this value, you must re-populate the poller cache.  Failure to do so, may result in lost data.</u></strong>'),
			'method' => 'drop_array',
			'default' => 300,
			'array' => $poller_intervals,
		),
		'cron_interval' => array(
			'friendly_name' => __('Cron/Daemon Interval'),
			'description' => __('The frequency that the Cacti data collector will be started.  You can use either crontab, a scheduled task (for windows), or the cactid systemd service to control launching the Cacti data collector.  For instructions on using the cactid daemon, review the README.md file in the service directory.'),
			'method' => 'drop_array',
			'default' => 300,
			'array' => $cron_intervals,
		),
		'process_leveling' => array(
			'friendly_name' => __('Balance Process Load'),
			'description' => __('If you choose this option, Cacti will attempt to balance the load of each poller process by equally distributing poller items per process.'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'poller_debug' => array(
			'friendly_name' => __('Debug Output Width'),
			'description' => __('If you choose this option, Cacti will check for output that exceeds Cacti\'s ability to store it and issue a warning when it finds it.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'oid_increasing_check_disable' => array(
			'friendly_name' => __('Disable increasing OID Check'),
			'description' => __('Controls disabling check for increasing OID while walking OID tree.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'remote_agent_timeout' => array(
			'friendly_name' => __('Remote Agent Timeout'),
			'description' => __('The amount of time, in seconds, that the Central Cacti web server will wait for a response from the Remote Data Collector to obtain various Device information before abandoning the request.  On Devices that are associated with Data Collectors other than the Central Cacti Data Collector, the Remote Agent must be used to gather Device information.'),
			'method' => 'drop_array',
			'default' => '5',
			'array' => array(
				5 => __('%d Seconds', 5),
				10 => __('%d Seconds', 10),
				15 => __('%d Seconds', 15),
				20 => __('%d Seconds', 20)
			)
		),
		'snmp_bulk_walk_size' => array(
			'friendly_name' => __('SNMP Bulkwalk Fetch Size'),
			'description' => __('How many OID\'s should be returned per snmpbulkwalk request?  For Devices with large SNMP trees, increasing this size will increase re-index performance over a WAN.'),
			'method' => 'drop_array',
			'default' => '10',
			'array' => array(
				'10' => '10',
				'20' => '20',
				'30' => '30',
				'40' => '40',
				'50' => '50',
				'60' => '60',
				'70' => '70',
				'80' => '80',
				'90' => '90',
				'100' => '100',
				'150' => '150',
				'200' => '200'
			)
		),
		'max_get_size' => array(
			'friendly_name' => __('SNMP Get OID Limit'),
			'description' => __('The default maximum number of SNMP Get OIDs to issue per snmpget request.  For Devices, this setting is controlled at the Device level.  You should only use this setting when using Cacti\'s SNMP API natively in your scripts or plugins.'),
			'method' => 'textbox',
			'default' => '10',
			'max_length' => '10',
			'size' => '5'
		),
		'poller_refresh_output_table' => array(
			'friendly_name' => __('Refresh Poller Table Per Cycle'),
			'description' => __('This setting is for a single poller systems only to rebuild the poller output table on each polling cycle to prevent the memory table from swapping on very large systems with large databases that could use swap.'),
			'method' => 'checkbox',
			'default' => '',
		),
		'disable_cache_replication' => array(
			'friendly_name' => __('Disable Resource Cache Replication'),
			'description' => __('By default, the main Cacti Data Collector will cache the entire web site and plugins into a Resource Cache.  Then, periodically the Remote Data Collectors will update themselves with any updates from the main Cacti Data Collector.  This Resource Cache essentially allows Remote Data Collectors to self upgrade.  If you do not wish to use this option, you can disable it using this setting.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'data_collector1_header' => array(
			'friendly_name' => __('Additional Data Collector Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'spine_log_level' => array(
			'friendly_name' => __('Invalid Data Logging'),
			'description' => __('How would you like the Data Collector output errors logged?  Options include: \'Detailed\' which details every error, \'Summary\' which provides the number of output errors per Device, and \'None\', which does not provide error counts.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				'0'  => __('None'),
				'1'  => __('Summary'),
				'2'  => __('Detailed')
			)
		),
		'php_servers' => array(
			'friendly_name' => __('Number of PHP Script Servers'),
			'description' => __('The number of concurrent script server processes to run per spine process.  Settings between 1 and 15 are accepted.  This parameter will help if you are running several threads and script server scripts and is only valid for the spine Data Collector.'),
			'method' => 'textbox',
			'default' => '1',
			'max_length' => '10',
			'size' => '5'
		),
		'script_timeout' => array(
			'friendly_name' => __('Script and Script Server Timeout Value'),
			'description' => __('The maximum time that spine will wait on a script to complete.  This timeout value is in seconds and is only valid for the spine Data Collector.'),
			'method' => 'textbox',
			'default' => '25',
			'max_length' => '10',
			'size' => '5'
		),
		'reindex_header' => array(
			'friendly_name' => __('Periodic All Device Re-Index'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'automatic_reindex' => array(
			'friendly_name' => __('Re-Index All Device Schedule'),
			'description' => __('At what frequency do you wish to Re-Index all Devices.  This Re-Index will occur at midnight at the frequency that you select.'),
			'default' => '0',
			'method' => 'drop_array',
			'array' => array(
				'0' => __('Disabled'),
				'1' => __('Daily'),
				'2' => __('Weekly on Sunday'),
				'3' => __('Monthly on Sunady')
			)
		),
		'timeouts_header' => array(
			'friendly_name' => __('Background Timeout and Concurrent Process Settings'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'reports_timeout' => array(
			'friendly_name' => __('Report Generation Timeout'),
			'description' => __('The maximum amount of time Cacti\'s Reports Generation script can run without generating a timeout error and being killed.'),
			'method' => 'drop_array',
			'default' => '300',
			'array' => array(
				'60'   => __('%s Minute', 1),
				'120'  => __('%s Minutes', 2),
				'300'  => __('%s Minutes', 5),
				'600'  => __('%s Minutes', 10),
				'1200' => __('%s Minutes', 20)
			)
		),
		'dsstats_timeout' => array(
			'friendly_name' => __('Data Source Statistics Timeout'),
			'description' => __('The maximum amount of time Cacti\'s Data Source Statistics script can run without generating a timeout error and being killed.'),
			'method' => 'drop_array',
			'default' => '300',
			'array' => array(
				'60'   => __('%s Minute', 1),
				'120'  => __('%s Minutes', 2),
				'300'  => __('%s Minutes', 5),
				'600'  => __('%s Minutes', 10),
				'1200' => __('%s Minutes', 20),
				'1800' => __('%s Minutes', 30),
				'3600' => __('1 Hour')
			)
		),
		'rrdcheck_timeout' => array(
			'friendly_name' => __('RRDChecker Timeout'),
			'description' => __('The maximum amount of time Cacti\'s RRDfile check script can run without generating a timeout error and being killed.'),
			'method' => 'drop_array',
			'default' => '3600',
			'array' => array(
				'300'   => __('%s Minutes', 5),
				'1800'  => __('%s Minutes', 30),
				'3600'  => __('%s Hour', 1),
				'7200'  => __('%s Hour', 2),
				'14400' => __('%s Hour', 4)
			)
		),
		'commands_timeout' => array(
			'friendly_name' => __('Poller Commands Timeout'),
			'description' => __('The maximum amount of time Cacti\'s Background Commands script can run without generating a timeout error and being killed.  This script will perform tasks such as re-indexing Devices and pruning devices from Remote Data Collectors.'),
			'method' => 'drop_array',
			'default' => '300',
			'array' => array(
				'60'   => __('%s Minute', 1),
				'120'  => __('%s Minutes', 2),
				'300'  => __('%s Minutes', 5),
				'600'  => __('%s Minutes', 10),
				'1200' => __('%s Minutes', 20)
			)
		),
		'commands_processes' => array(
			'friendly_name' => __('Poller Command Concurrent Processes'),
			'description' => __('The number of concurrent Poller Command processes.  The will be at most one concurrent command per host within the Poller Command pool.'),
			'default' => '1',
			'method' => 'drop_array',
			'array' => array(
				1  => __('1 Process'),
				2  => __('%d Processes', 2),
				3  => __('%d Processes', 3),
				4  => __('%d Processes', 4),
				5  => __('%d Processes', 5),
				6  => __('%d Processes', 6),
				7  => __('%d Processes', 7),
				8  => __('%d Processes', 8),
				9  => __('%d Processes', 9),
				10 => __('%d Processes', 10),
				11 => __('%d Processes', 11),
				12 => __('%d Processes', 12),
				13 => __('%d Processes', 13),
				14 => __('%d Processes', 14),
				15 => __('%d Processes', 15),
				16 => __('%d Processes', 16),
				17 => __('%d Processes', 17),
				18 => __('%d Processes', 18),
				19 => __('%d Processes', 19),
				20 => __('%d Processes', 20),
			)
		),
		'maintenance_timeout' => array(
			'friendly_name' => __('Maintenance Background Generation Timeout'),
			'description' => __('The maximum amount of time a Cacti\'s Maintenance script can run without generating a timeout error and being killed.'),
			'method' => 'drop_array',
			'default' => '300',
			'array' => array(
				'60'   => __('%s Minute', 1),
				'120'  => __('%s Minutes', 2),
				'300'  => __('%s Minutes', 5),
				'600'  => __('%s Minutes', 10),
				'1200' => __('%s Minutes', 20),
				'3600' => __('%s Hour', 1)
			)
		),
		'spikekill_timeout' => array(
			'friendly_name' => __('Spikekill Background Generation Timeout'),
			'description' => __('The maximum amount of time a Cacti\'s Spikekill script can run without generating a timeout error and being killed.'),
			'method' => 'drop_array',
			'default' => '3600',
			'array' => array(
				'60'    => __('%s Minute', 1),
				'120'   => __('%s Minutes', 2),
				'300'   => __('%s Minutes', 5),
				'600'   => __('%s Minutes', 10),
				'1200'  => __('%s Minutes', 20),
				'3600'  => __('%s Hour', 1),
				'7200'  => __('%s Hours', 2),
				'14400' => __('%s Hours', 4),
				'28800' => __('%s Hours', 8)
			)
		),
		'data_collector_header' => array(
			'friendly_name' => __('Data Collector Defaults'),
			'description'   => __('These settings are maintained at the Data Collector level.  The values here are only defaults used when first creating a Data Collector.'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'concurrent_processes' => array(
			'friendly_name' => __('Data Collector Processes'),
			'description' => __('The default number of concurrent processes to execute per Data Collector.  NOTE: Starting from Cacti 1.2, this setting is maintained in the Data Collector.  Moving forward, this value is only a preset for the Data Collector.  Using a higher number when using cmd.php will improve performance.  Performance improvements in Spine are best resolved with the threads parameter.  When using Spine, we recommend a lower number and leveraging threads instead.  When using cmd.php, use no more than 2x the number of CPU cores.'),
			'method' => 'textbox',
			'default' => '1',
			'max_length' => '10',
			'size' => '5'
		),
		'max_threads' => array(
			'friendly_name' => __('Threads per Process'),
			'description' => __('The Default Threads allowed per process.  NOTE: Starting in Cacti 1.2+, this setting is maintained in the Data Collector, and this is simply the Preset.  Using a higher number when using Spine will improve performance.  However, ensure that you have enough MySQL/MariaDB connections to support the following equation: connections = data collectors * processes * (threads + script servers).  You must also ensure that you have enough spare connections for user login connections as well.'),
			'method' => 'textbox',
			'default' => '1',
			'max_length' => '10',
			'size' => '5'
		),
	),
	'authentication' => array(
		'auth_header' => array(
			'friendly_name' => __('General'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'auth_method' => array(
			'friendly_name' => __('Authentication Method'),
			'description' => __('<blockquote><i>Built-in Authentication</i> - Cacti handles user authentication, which allows you to create users and give them rights to different areas within Cacti.<br><br><i>Web Basic Authentication</i> - Authentication is handled by the web server. Users can be added or created automatically on first login if the Template User is defined, otherwise the defined guest permissions will be used.<br><br><i>LDAP Authentication</i> - Allows for authentication against a LDAP server. Users will be created automatically on first login if the Template User is defined, otherwise the defined guest permissions will be used.  If PHPs LDAP module is not enabled, LDAP Authentication will not appear as a selectable option.<br><br><i>Multiple LDAP/AD Domain Authentication</i> - Allows administrators to support multiple disparate groups from different LDAP/AD directories to access Cacti resources.  Just as LDAP Authentication, the PHP LDAP module is required to utilize this method.</blockquote>'),
			'method' => 'drop_array',
			'default' => 1,
			'array' => $auth_methods
		),
		'auth_cache_enabled' => array(
			'friendly_name' => __('Support Authentication Cookies'),
			'description' => __('If a user authenticates and selects \'Keep me signed in\', an authentication cookie will be created on the user\'s computer allowing that user to stay logged in.  The authentication cookie expires after 90 days of non-use.'),
			'default' => 'on',
			'method' => 'checkbox'
		),
		'special_users_header' => array(
			'friendly_name' => __('Special Users'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'admin_user' => array(
			'friendly_name' => __('Primary Admin'),
			'description' => __('The name of the primary administrative account that will automatically receive Emails when the Cacti system experiences issues.  To receive these Emails, ensure that your mail settings are correct, and the administrative account has an Email address that is set.'),
			'method' => 'drop_sql',
			'none_value' => __('No User'),
			'sql' => 'SELECT id AS id, username AS name FROM user_auth WHERE realm = 0 ORDER BY username',
			'default' => '1'
		),
		'guest_user' => array(
			'friendly_name' => __('Guest User'),
			'description' => __('The name of the guest user for viewing graphs; is \'No User\' by default.'),
			'method' => 'drop_sql',
			'none_value' => __('No User'),
			'sql' => 'SELECT id AS id, username AS name FROM user_auth WHERE realm = 0 AND id NOT IN (' . $admin_account . ') ORDER BY username',
			'default' => '0'
		),
		'user_template' => array(
			'friendly_name' => __('User Template'),
			'description' => __('The name of the user that Cacti will use as a template for new Web Basic and LDAP users; is \'guest\' by default.  This user account will be disabled from logging in upon being selected.'),
			'method' => 'drop_sql',
			'none_value' => __('No User'),
			'sql' => 'SELECT id AS id, username AS name FROM user_auth WHERE realm = 0 AND id NOT IN (' . $admin_account . ') ORDER BY username',
			'default' => '0'
		),
		'basic_header' => array(
			'friendly_name' => __('Basic Authentication Settings'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'basic_auth_fail_message' => array(
			'friendly_name' => __('Basic Auth Login Failure Message'),
			'description' => __('When using basic authentication, if there are issues mapping the username to a valid Cacti account, the message included here will be displayed to users.  It can include both text and HTML.'),
			'method' => 'textarea',
			'textarea_rows' => '4',
			'textarea_cols' => '80',
			'max_length' => 512
		),
		'path_basic_mapfile' => array(
			'friendly_name' => __('Basic Auth Mapfile'),
			'description' => __('When using basic authentication, if the basic account needs to be translated to a different login account, you can specify a CSV file here to map the basic account to the desired login account.'),
			'method' => 'filepath',
			'file_type' => 'ascii',
			'max_length' => 255,
			'default' => '',
			'install_optional' => true
		),
		'secpass_header' => array(
			'friendly_name' => __('Local Account Complexity Requirements'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'secpass_minlen' => array(
			'friendly_name' => __('Minimum Length'),
			'description' => __('This is minimal length of allowed passwords.'),
			'method' => 'textbox',
			'default' => '8',
			'max_length' => 2,
			'size' => 4
		),
		'secpass_reqmixcase' => array(
			'friendly_name' => __('Require Mix Case'),
			'description' => __('This will require new passwords to contains both lower and upper-case characters.'),
			'method' => 'checkbox',
			'default' => 'on',
		),
		'secpass_reqnum' => array(
			'friendly_name' => __('Require Number'),
			'description' => __('This will require new passwords to contain at least 1 numerical character.'),
			'method' => 'checkbox',
			'default' => 'on',
		),
		'secpass_reqspec' => array(
			'friendly_name' => __('Require Special Character'),
			'description' => __('This will require new passwords to contain at least 1 special character.'),
			'method' => 'checkbox',
			'default' => 'on',
		),
		'secpass_forceold' => array(
			'friendly_name' => __('Force Complexity Upon Old Passwords'),
			'description' => __('This will require all old passwords to also meet the new complexity requirements upon login.  If not met, it will force a password change.'),
			'method' => 'checkbox',
			'default' => '',
		),
		'secpass_expireaccount' => array(
			'friendly_name' => __('Expire Inactive Accounts'),
			'description' => __('This is maximum number of days before inactive accounts are disabled.  The Admin account is excluded from this policy.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				'0'   => __('Disabled'),
				'30'  => __('%d Days', 30),
				'60'  => __('%d Days', 60),
				'90'  => __('%d Days', 90),
				'120' => __('%d Days', 120),
				'365' => __('%d Year', 1),
				'730' => __('%d Years', 2) )
		),
		'secpass_expirepass' => array(
			'friendly_name' => __('Expire Password'),
			'description' => __('This is maximum number of days before a password is set to expire.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				'0'   => __('Disabled'),
				'30'  => __('%d Days', 30),
				'60'  => __('%d Days', 60),
				'90'  => __('%d Days', 90),
				'120' => __('%d Days', 120)
			)
		),
		'secpass_history' => array(
			'friendly_name' => __('Password History'),
			'description' => __('Remember this number of old passwords and disallow re-using them.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				'0'  => __('Disabled'),
				'1'  => __('1 Change'),
				'2'  => __('%d Changes', 2),
				'3'  => __('%d Changes', 3),
				'4'  => __('%d Changes', 4),
				'5'  => __('%d Changes', 5),
				'6'  => __('%d Changes', 6),
				'7'  => __('%d Changes', 7),
				'8'  => __('%d Changes', 8),
				'9'  => __('%d Changes', 9),
				'10' => __('%d Changes', 10),
				'11' => __('%d Changes', 11),
				'12' => __('%d Changes', 12) )
		),
		'secpass_lock_header' => array(
			'friendly_name' => __('Account Locking'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'secpass_lockfailed' => array(
			'friendly_name' => __('Lock Accounts'),
			'description' => __('Lock an account after this many failed attempts in 1 hour.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				'0' => __('Disabled'),
				'1' => __('1 Attempt'),
				'2' => __('%d Attempts', 2),
				'3' => __('%d Attempts', 3),
				'4' => __('%d Attempts', 4),
				'5' => __('%d Attempts', 5),
				'6' => __('%d Attempts', 6) )
		),
		'secpass_unlocktime' => array(
			'friendly_name' => __('Auto Unlock'),
			'description' => __('An account will automatically be unlocked after this many minutes.  Even if the correct password is entered, the account will not unlock until this time limit has been met.  Max of 1440 minutes (1 Day)'),
			'method' => 'drop_array',
			'default' => '60',
			'array' => array(
				'0'    => __('Disabled'),
				'1'    => __('1 Minute'),
				'2'    => __('%d Minutes', 2),
				'5'    => __('%d Minutes', 5),
				'10'   => __('%d Minutes', 10),
				'20'   => __('%d Minutes', 20),
				'30'   => __('%d Minutes', 30),
				'60'   => __('1 Hour'),
				'120'  => __('%d Hours', 2),
				'240'  => __('%d Hours', 4),
				'480'  => __('%d Hours', 8),
				'960'  => __('%d Hours', 16),
				'1440' => __('1 Day') )
		),
		'ldap_general_header' => array(
			'friendly_name' => __('LDAP General Settings'),
			'method' => 'spacer'
		),
		'ldap_server' => array(
			'friendly_name' => __('Server(s)'),
			'description' => __('A space delimited list of DNS hostnames or IP address of for valid LDAP servers.  Cacti will attempt to use the LDAP servers from left to right to authenticate a user.'),
			'method' => 'textbox',
			'size' => '80',
			'max_length' => '255'
		),
		'ldap_port' => array(
			'friendly_name' => __('Port Standard'),
			'description' => __('TCP port for Non-SSL communications including LDAP + TLS.  Default is 389.'),
			'method' => 'textbox',
			'max_length' => '5',
			'default' => '389',
			'size' => '5'
		),
		'ldap_port_ssl' => array(
			'friendly_name' => __('Port SSL'),
			'description' => __('TCP port for LDAPS for SSL communications.  Default is 636.'),
			'method' => 'textbox',
			'max_length' => '5',
			'default' => '636',
			'size' => '5'
		),
		'ldap_version' => array(
			'friendly_name' => __('Protocol Version'),
			'description' => __('Protocol Version to connect to the server with.'),
			'method' => 'drop_array',
			'default' => '3',
			'array' => $ldap_versions
		),
		'ldap_network_timeout' => array(
			'friendly_name' => __('Connect Timeout'),
			'description' => __('The Network Connect Timeout in seconds.'),
			'method' => 'textbox',
			'max_length' => '5',
			'default' => '2',
			'size' => '5'
		),
		'ldap_bind_timeout' => array(
			'friendly_name' => __('Bind Timeout'),
			'description' => __('The Bind Timeout in seconds.'),
			'method' => 'textbox',
			'max_length' => '5',
			'default' => '5',
			'size' => '5'
		),
		'ldap_debug' => array(
			'friendly_name' => __('LDAP Debug Mode'),
			'description' => __('If Checked Cacti will log extra LDAP information to the Cacti log during Binding and Searching activities.'),
			'default' => '',
			'method' => 'checkbox'
		),
		'ldap_encryption' => array(
			'friendly_name' => __('Encryption'),
			'description' => __('Encryption that the server supports. NOTE: When using LDAP + TLS you must use version 3.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => $ldap_encryption
		),
		'ldap_tls_certificate' => array(
			'friendly_name' => __('TLS Certificate Requirements'),
			'description' => __('Should LDAP verify TLS Certificates when received by the Client.'),
			'method' => 'drop_array',
			'default' => LDAP_OPT_X_TLS_NEVER,
			'array' => $ldap_tls_cert_req
		),
		'ldap_referrals' => array(
			'friendly_name' => __('Referrals'),
			'description' => __('Enable or Disable LDAP referrals.  If disabled, it may increase the speed of searches.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				'0' => __('Disabled'),
				'1' => __('Enable')
			)
		),
		'ldap_mode' => array(
			'friendly_name' => __('Mode'),
			'description' => __('Mode which cacti will attempt to authenticate against the LDAP server.<blockquote><i>No Searching</i> - No Distinguished Name (DN) searching occurs, just attempt to bind with the provided Distinguished Name (DN) format.<br><br><i>Anonymous Searching</i> - Attempts to search for username against LDAP directory via anonymous binding to locate the user\'s Distinguished Name (DN).<br><br><i>Specific Searching</i> - Attempts search for username against LDAP directory via Specific Distinguished Name (DN) and Specific Password for binding to locate the user\'s Distinguished Name (DN).'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => $ldap_modes
		),
		'ldap_dn' => array(
			'friendly_name' => __('Distinguished Name (DN)'),
			'description' => __('The "Distinguished Name" syntax, applicable for both OpenLDAP and Windows AD configurations, offers flexibility in defining user identity. For OpenLDAP, the format follows this structure: <i>"uid=&lt;username&gt;,ou=people,dc=domain,dc=local"</i>. Windows AD provides an alternative syntax: <i>"&lt;username&gt;@win2kdomain.local"</i>, commonly known as "userPrincipalName (UPN)". In this context, "&lt;username&gt;" represents the specific username provided during the login prompt. This is particularly pertinent when operating in "No Searching" mode, or "Require Group Membership" enabled.'),
			'method' => 'textbox',
			'max_length' => '255',
			'size' => '100'
		),
		'ldap_group_require' => array(
			'friendly_name' => __('Require Group Membership'),
			'description' => __('Require user to be member of group to authenticate. Group settings must be set for this to work, enabling without proper group settings will cause authentication failure.'),
			'default' => '',
			'method' => 'checkbox'
		),
		'ldap_group_header' => array(
			'friendly_name' => __('LDAP Group Settings'),
			'method' => 'spacer'
		),
		'ldap_group_dn' => array(
			'friendly_name' => __('Group Distinguished Name (DN)'),
			'description' => __('Distinguished Name of the group that user must have membership.'),
			'method' => 'textbox',
			'max_length' => '255',
			'size' => '100'
		),
		'ldap_group_attrib' => array(
			'friendly_name' => __('Group Member Attribute'),
			'description' => __('This refers to the specific attribute within the LDAP directory that holds the usernames of group members. It is crucial to ensure that the attribute value aligns with the configuration specified in the "Distinguished Name" or that the actual attribute value is searchable using the settings outlined in the "Distinguished Name".'),
			'method' => 'textbox',
			'max_length' => '255',
			'size' => '100'
		),
		'ldap_group_member_type' => array(
			'friendly_name' => __('Group Member Type'),
			'description' => __('Defines if users use full Distinguished Name or just Username in the defined Group Member Attribute.'),
			'method' => 'drop_array',
			'default' => 1,
			'array' => array(
				1 => __('Distinguished Name'),
				2 => __('Username')
			)
		),
		'ldap_search_base_header' => array(
			'friendly_name' => __('LDAP Specific Search Settings'),
			'method' => 'spacer'
		),
		'ldap_search_base' => array(
			'friendly_name' => __('Search Base'),
			'description' => __('Search base for searching the LDAP directory, such as <i>\'dc=win2kdomain,dc=local\'</i> or <i>\'ou=people,dc=domain,dc=local\'</i>.'),
			'method' => 'textbox',
			'max_length' => '255'
		),
		'ldap_search_filter' => array(
			'friendly_name' => __('Search Filter'),
			'description' => __('Search filter to use to locate the user in the LDAP directory, such as for windows: <i>\'(&amp;(objectclass=user)(objectcategory=user)(userPrincipalName=&lt;username&gt;*))\'</i> or for OpenLDAP: <i>\'(&(objectClass=account)(uid=&lt;username&gt))\'</i>.  \'&lt;username&gt\' is replaced with the username that was supplied at the login prompt. '),
			'method' => 'textbox',
			'max_length' => '255'
		),
		'ldap_specific_dn' => array(
			'friendly_name' => __('Search Distinguished Name (DN)'),
			'description' => __('Distinguished Name for Specific Searching binding to the LDAP directory.'),
			'method' => 'textbox',
			'max_length' => '255'
		),
		'ldap_specific_password' => array(
			'friendly_name' => __('Search Password'),
			'description' => __('Password for Specific Searching binding to the LDAP directory.'),
			'method' => 'textbox_password',
			'max_length' => '255'
		),
		'cn_header' => array(
			'friendly_name' => __('LDAP CN Settings'),
			'method' => 'spacer'
		),
		'cn_full_name' => array(
			'friendly_name' => __('Full Name'),
			'description' => __('Field that will replace the Full Name when creating a new user, taken from LDAP. (on windows: displayname) '),
			'method' => 'textbox',
			'max_length' => '255'
		),
		'cn_email' => array(
			'friendly_name' => __('Email'),
			'description' => __('Field that will replace the Email taken from LDAP. (on windows: mail)'),
			'method' => 'textbox',
			'max_length' => '255'
		),
	),
	'mail' => array(
		'settings_web_url' => array(
			'friendly_name' => __('URL Linking'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'base_url' => array(
			'friendly_name' => __('Server Base URL'),
			'description' => __('This is a the server location that will be used for links to the Cacti site. This should include the subdirectory if Cacti does not run from root folder.'),
			'method' => 'textbox',
			'max_length' => 255,
			'size' => '60',
			'default' => 'http://' . gethostname() . $config['url_path']
		),
		'settings_email_header' => array(
			'friendly_name' => __('Emailing Options'),
			'method' => 'spacer',
		),
		'notify_admin' => array(
			'friendly_name' => __('Notify Primary Admin of Issues'),
			'description' => __('In cases where the Cacti server is experiencing problems, should the Primary Administrator be notified by Email?  The Primary Administrator\'s Cacti user account is specified under the Authentication tab on Cacti\'s settings page. It defaults to the \'admin\' account.'),
			'default' => '',
			'method' => 'checkbox'
		),
		'settings_test_email' => array(
			'friendly_name' => __('Test Email'),
			'description' => __('This is a Email account used for sending a test message to ensure everything is working properly.'),
			'method' => 'textbox',
			'max_length' => 255,
		),
		'settings_how' => array(
			'friendly_name' => __('Mail Services'),
			'description' => __('Which mail service to use in order to send mail'),
			'method' => 'drop_array',
			'default' => 0,
			'array' => $mail_methods,
		),
		'settings_ping_mail' => array(
			'friendly_name' => __('Ping Mail Server'),
			'description' => __('Ping the Mail Server before sending test Email?'),
			'method' => 'drop_array',
			'default' => 0,
			'array' => array(
				0 => __('Yes'),
				1 => __('No')
			)
		),
		'settings_from_email' => array(
			'friendly_name' => __('From Email Address'),
			'description' => __('This is the Email address that the Email will appear from.'),
			'method' => 'textbox',
			'max_length' => 255,
		),
		'settings_from_name' => array(
			'friendly_name' => __('From Name'),
			'description' => __('This is the actual name that the Email will appear from.'),
			'method' => 'textbox',
			'max_length' => 255,
		),
		'settings_wordwrap' => array(
			'friendly_name' => __('Word Wrap'),
			'description' => __('This is how many characters will be allowed before a line in the Email is automatically word wrapped. (0 = Disabled)'),
			'method' => 'textbox',
			'default' => 120,
			'max_length' => 4,
			'size' => 5
		),
		'settings_sendmail_header' => array(
			'friendly_name' => __('Sendmail Options'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'settings_sendmail_path' => array(
			'friendly_name' => __('Sendmail Path'),
			'description' => __('This is the path to sendmail on your server. (Only used if Sendmail is selected as the Mail Service)'),
			'method' => 'filepath',
			'file_type' => 'binary',
			'max_length' => 255,
			'default' => '',
			'install_optional' => true
		),
		'settings_smtp_header' => array(
			'friendly_name' => __('SMTP Options'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'settings_smtp_host' => array(
			'friendly_name' => __('SMTP Hostname'),
			'description' => __('This is the hostname/IP of the SMTP Server you will send the Email to. For failover, separate your hosts using a semi-colon.'),
			'method' => 'textbox',
			'default' => 'localhost',
			'max_length' => 255,
		),
		'settings_smtp_port' => array(
			'friendly_name' => __('SMTP Port'),
			'description' => __('The port on the SMTP Server to use.'),
			'method' => 'textbox',
			'max_length' => 255,
			'default' => 25,
			'size' => 5
		),
		'settings_smtp_username' => array(
			'friendly_name' => __('SMTP Username'),
			'description' => __('The username to authenticate with when sending via SMTP. (Leave blank if you do not require authentication.)'),
			'method' => 'textbox',
			'max_length' => 255,
		),
		'settings_smtp_password' => array(
			'friendly_name' => __('SMTP Password'),
			'description' => __('The password to authenticate with when sending via SMTP. (Leave blank if you do not require authentication.)'),
			'method' => 'textbox_password',
			'max_length' => 255,
		),
		'settings_smtp_secure' => array(
			'friendly_name' => __('SMTP Security'),
			'description' => __('The encryption method to use for the Email.'),
			'method' => 'drop_array',
			'array' => array(
				'none' => __('None'),
				'ssl'  => __('SSL'),
				'tls'  => __('TLS')
			),
			'default' => 'none'
		),
		'settings_smtp_timeout' => array(
			'friendly_name' => __('SMTP Timeout'),
			'description' => __('Please enter the SMTP timeout in seconds.'),
			'method' => 'textbox',
			'default' => '10',
			'max_length' => '10',
			'size' => '5'
		),
		'reports_header' => array(
			'friendly_name' => __('Reporting Presets'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'reports_default_image_format' => array(
			'friendly_name' => __('Default Graph Image Format'),
			'description' => __('When creating a new report, what image type should be used for the inline graphs.'),
			'method' => 'drop_array',
			'default' => REPORTS_TYPE_INLINE_PNG,
			'array' => $attach_types
		),
		'reports_max_attach' => array(
			'friendly_name' => __('Maximum E-Mail Size'),
			'description' => __('The maximum size of the E-Mail message including all attachments.'),
			'method' => 'drop_array',
			'default' => REPORTS_DEFAULT_MAX_SIZE,
			'array' => $attachment_sizes
		),
		'reports_log_verbosity' => array(
			'friendly_name' => __('Poller Logging Level for Cacti Reporting'),
			'description' => __('What level of detail do you want sent to the log file. WARNING: Leaving in any other status than NONE or LOW can exhaust your disk space rapidly.'),
			'method' => 'drop_array',
			'default' => POLLER_VERBOSITY_LOW,
			'array' => $logfile_verbosity,
		),
		'reports_allow_ln' => array(
			'friendly_name' => __('Enable Lotus Notes (R) tweak'),
			'description' => __('Enable code tweak for specific handling of Lotus Notes Mail Clients.'),
			'method' => 'checkbox',
			'default' => '',
		),
		'settings_dns_header' => array(
			'friendly_name' => __('DNS Options'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'settings_dns_primary' => array(
			'friendly_name' => __('Primary DNS IP Address'),
			'description' => __('Enter the primary DNS IP Address to utilize for reverse lookups.'),
			'method' => 'textbox',
			'default' => '',
			'max_length' => '30'
		),
		'settings_dns_secondary' => array(
			'friendly_name' => __('Secondary DNS IP Address'),
			'description' => __('Enter the secondary DNS IP Address to utilize for reverse lookups.'),
			'method' => 'textbox',
			'default' => '',
			'max_length' => '30'
		),
		'settings_dns_timeout' => array(
			'friendly_name' => __('DNS Timeout'),
			'description' => __('Please enter the DNS timeout in milliseconds.  Cacti uses a PHP based DNS resolver.'),
			'method' => 'textbox',
			'default' => '500',
			'max_length' => '10',
			'size' => '5'
		),
	),
	'boost' => array(
		'boost_hq_header' => array(
			'friendly_name' => __('On-demand RRD Update Settings'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'boost_rrd_update_enable' => array(
			'friendly_name' => __('Enable On-demand RRD Updating'),
			'description' => __('Should Boost enable on demand RRD updating in Cacti?  If you disable, this change will not take affect until after the next polling cycle.  When you have Remote Data Collectors, this settings is required to be on.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'boost_rrd_update_system_enable' => array(
			'friendly_name' => __('System Level RRD Updater'),
			'description' => __('Before RRD On-demand Update Can be Cleared, a poller run must always pass'),
			'method' => 'hidden',
			'default' => ''
		),
		'boost_rrd_update_interval' => array(
			'friendly_name' => __('How Often Should Boost Update All RRDs'),
			'description' => __('When you enable boost, your RRD files are only updated when they are requested by a user, or when this time period elapses.'),
			'default' => '60',
			'method' => 'drop_array',
			'array' => $boost_refresh_interval
		),
		'boost_parallel' => array(
			'friendly_name' => __('Number of Boost Processes'),
			'description' => __('The number of concurrent boost processes to use to use to process all of the RRDs in the boost table.'),
			'default' => '1',
			'method' => 'drop_array',
			'array' => array(
				1  => __('1 Process'),
				2  => __('%d Processes', 2),
				3  => __('%d Processes', 3),
				4  => __('%d Processes', 4),
				5  => __('%d Processes', 5),
				6  => __('%d Processes', 6),
				7  => __('%d Processes', 7),
				8  => __('%d Processes', 8),
				9  => __('%d Processes', 9),
				10 => __('%d Processes', 10),
				11 => __('%d Processes', 11),
				12 => __('%d Processes', 12),
				13 => __('%d Processes', 13),
				14 => __('%d Processes', 14),
				15 => __('%d Processes', 15),
				16 => __('%d Processes', 16),
				17 => __('%d Processes', 17),
				18 => __('%d Processes', 18),
				19 => __('%d Processes', 19),
				20 => __('%d Processes', 20),
			)
		),
		'boost_rrd_update_max_records' => array(
			'friendly_name' => __('Maximum Records'),
			'description' => __('If the boost output table exceeds this size, in records, an update will take place.'),
			'method' => 'textbox',
			'default' => '1000000',
			'max_length' => '20',
			'size' => '10'
		),
		'boost_rrd_update_max_records_per_select' => array(
			'friendly_name' => __('Maximum Data Source Items Per Pass'),
			'description' => __('To optimize performance, the boost RRD updater needs to know how many Data Source Items should be retrieved in one pass.  Please be careful not to set too high as graphing performance during major updates can be compromised.  If you encounter graphing or polling slowness during updates, lower this number.  The default value is 50000.'),
			'method' => 'drop_array',
			'default' => '50000',
			'array' => $boost_max_rows_per_select
		),
		'boost_rrd_update_string_length' => array(
			'friendly_name' => __('Maximum Argument Length'),
			'description' => __('When boost sends update commands to RRDtool, it must not exceed the operating systems Maximum Argument Length.  This varies by operating system and kernel level.  For example: Windows 2000 <= 2048, FreeBSD <= 65535, Linux 2.6.22-- <= 131072, Linux 2.6.23++ unlimited'),
			'method' => 'textbox',
			'default' => '2000',
			'max_length' => '20',
			'size' => '10'
		),
		'boost_poller_mem_limit' => array(
			'friendly_name' => __('Memory Limit for Boost and Poller'),
			'description' => __('The maximum amount of memory for the Cacti Poller and Boosts Poller'),
			'method' => 'drop_array',
			'default' => '1024',
			'array' => $boost_max_memory
		),
		'boost_rrd_update_max_runtime' => array(
			'friendly_name' => __('Maximum RRD Update Script Run Time'),
			'description' => __('If the boost poller exceeds this runtime, a warning will be placed in the cacti log,'),
			'method' => 'drop_array',
			'default' => '1200',
			'array' => $boost_max_runtime
		),
		'boost_redirect' => array(
			'friendly_name' => __('Enable direct population of poller_output_boost table'),
			'description' => __('Enables direct insert of records into poller output boost with results in a 25% time reduction in each poll cycle.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'path_boost_log' => array(
			'friendly_name' => __('Boost Debug Log'),
			'description' => __('If this field is non-blank, Boost will log RRDUpdate output from the boost	poller process.'),
			'method' => 'filepath',
			'file_type' => 'ascii',
			'default' => '',
			'max_length' => '255'
		),
		'boost_png_header' => array(
			'friendly_name' => __('Image Caching'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'boost_png_cache_enable' => array(
			'friendly_name' => __('Enable Image Caching'),
			'description' => __('Should image caching be enabled?'),
			'method' => 'checkbox',
			'default' => ''
		),
		'boost_png_cache_directory' => array(
			'friendly_name' => __('Location for Image Files'),
			'description' => __('Specify the location where Boost should place your image files.  These files will be automatically purged by the poller when they expire.'),
			'method' => 'dirpath',
			'max_length' => '255',
			'default' => $config['base_path'] . '/cache/boost/'
		)
	),
	'data' => array(
		'dsstats_hq_header' => array(
			'friendly_name' => __('Data Sources Statistics'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'dsstats_enable' => array(
			'friendly_name' => __('Enable Data Source Statistics Collection'),
			'description' => __('Should Data Source Statistics be collected for this Cacti system?'),
			'method' => 'checkbox',
			'default' => ''
		),
		'dsstats_parallel' => array(
			'friendly_name' => __('Number of DSStats Processes'),
			'description' => __('The number of concurrent DSStats processes to use to use to process all of the Data Sources.'),
			'default' => '1',
			'method' => 'drop_array',
			'array' => array(
				1  => __('1 Process'),
				2  => __('%d Processes', 2),
				3  => __('%d Processes', 3),
				4  => __('%d Processes', 4),
				5  => __('%d Processes', 5),
				6  => __('%d Processes', 6),
				7  => __('%d Processes', 7),
				8  => __('%d Processes', 8),
				9  => __('%d Processes', 9),
				10 => __('%d Processes', 10),
				11 => __('%d Processes', 11),
				12 => __('%d Processes', 12),
				13 => __('%d Processes', 13),
				14 => __('%d Processes', 14),
				15 => __('%d Processes', 15),
				16 => __('%d Processes', 16),
				17 => __('%d Processes', 17),
				18 => __('%d Processes', 18),
				19 => __('%d Processes', 19),
				20 => __('%d Processes', 20),
			)
		),
		'dsstats_daily_interval' => array(
			'friendly_name' => __('Daily Update Frequency'),
			'description' => __('How frequent should Daily Stats be updated?'),
			'default' => '60',
			'method' => 'drop_array',
			'array' => $dsstats_refresh_interval
		),
		'dsstats_hourly_duration' => array(
			'friendly_name' => __('Hourly Average Window'),
			'description' => __('The number of consecutive hours that represent the hourly average.  Keep in mind that a setting too high can result in very large memory tables'),
			'default' => '60',
			'method' => 'drop_array',
			'array' => $dsstats_hourly_avg
		),
		'dsstats_major_update_time' => array(
			'friendly_name' => __('Maintenance Time'),
			'description' => __('What time of day should Weekly, Monthly, and Yearly Data be updated?  Format is HH:MM [am/pm]'),
			'method' => 'textbox',
			'default' => '12:00am',
			'max_length' => '20',
			'size' => '10'
		),
		'dsstats_poller_mem_limit' => array(
			'friendly_name' => __('Memory Limit for Data Source Statistics Data Collector'),
			'description' => __('The maximum amount of memory for the Cacti Poller and Data Source Statistics Poller'),
			'method' => 'drop_array',
			'default' => '1024',
			'array' => $dsstats_max_memory
		),
		'rrdcheck_hq_header' => array(
			'friendly_name' => __('RRDfile Check'),
			'collapsible' => 'true',
			'method' => 'spacer',
		),
		'rrdcheck_enable' => array(
			'friendly_name' => __('Enable RRDfile Check'),
			'description' => __('Should RRDfile check be enabled for this Cacti system?'),
			'method' => 'checkbox',
			'default' => ''
		),
		'rrdcheck_parallel' => array(
			'friendly_name' => __('Number of RRDfile Check Processes'),
			'description' => __('The number of concurrent RRDfile check processes to use to use to process all of rrd files.'),
			'default' => '1',
			'method' => 'drop_array',
			'array' => array(
				1  => __('1 Process'),
				2  => __('%d Processes', 2),
				3  => __('%d Processes', 3),
				4  => __('%d Processes', 4),
				5  => __('%d Processes', 5),
				6  => __('%d Processes', 6),
				7  => __('%d Processes', 7),
				8  => __('%d Processes', 8),
				9  => __('%d Processes', 9),
				10 => __('%d Processes', 10),
				11 => __('%d Processes', 11),
				12 => __('%d Processes', 12),
				13 => __('%d Processes', 13),
				14 => __('%d Processes', 14),
				15 => __('%d Processes', 15),
				16 => __('%d Processes', 16),
				17 => __('%d Processes', 17),
				18 => __('%d Processes', 18),
				19 => __('%d Processes', 19),
				20 => __('%d Processes', 20),
			)
		),
		'rrdcheck_interval' => array(
			'friendly_name' => __('Check Frequency'),
			'description' => __('How frequent should RRD be checked ?'),
			'default' => '240',
			'method' => 'drop_array',
			'array' => $rrdcheck_intervals
		),
		'storage_header' => array(
			'friendly_name' => __('Data Storage Settings'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'storage_location' => array(
			'friendly_name' => __('Location'),
			'description' => __('Choose if RRDs will be stored locally or being handled by an external RRDtool proxy server.'),
			'method' => 'drop_array',
			'default' => 0,
			'array' => array (
				__('Local'),
				__('RRDtool Proxy Server')
			)
		),
		'extended_paths_header' => array(
			'friendly_name' => __('Structure RRDfile Paths'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'extended_paths' => array(
			'friendly_name' => __('Enable Structured Paths'),
			'description' => __('Use a separate subfolder for each hosts RRD files.  The naming of the RRDfiles will be one of the following:<br><ul><li>&lt;path_cacti&gt;/rra/host_id/local_data_id.rrd,</li><li>&lt;path_cacti&gt;/rra/device_id/data_query_id/local_data_id.rrd,</li><li>&lt;path_cacti&gt;/rra/device_hash/device_id/local_data_id.rrd,</li><li>&lt;path_cacti&gt;/rra/device_hash/device_id/data_query_id/local_data_id.rrd.</li></ul><br>You can make this change after install by running the CLI script <b>structure_rra_paths.php</b> after you make the change.  NOTE: If you change Max Directories value to decrease the number of directories, or if you change the Directory Pattern, empty directories will not be pruned after you rerun the <b>structure_rra_paths.php</b> script.'),
			'method' => 'checkbox'
		),
		'extended_paths_type' => array(
			'friendly_name' => __('Directory Pattern'),
			'description' => __('Which Directory Pattern do you wish to use for Structured RRD Paths.  \'Device ID\' is the default.  The setting \'Device ID/Data Query ID\' should be used when you have Devices with thousands of Graphs.  After Changing the Directory Pattern, you must run the Structured Path CLI script again to modify the RRDfile paths to the new Pattern.'),
			'method' => 'drop_array',
			'default' => 'device',
			'array' => array (
				'device' => __('Device ID'),
				'device_dq' => __('Device ID/Data Query ID'),
				'hash_device' => __('Device Hash/Device ID'),
				'hash_device_dq' => __('Device Hash/Device ID/Data Query ID')
			)
		),
		'extended_paths_hashes' => array(
			'friendly_name' => __('Max Device Hash Directories'),
			'description' => __('The maximum number of Device Directories to be created based upon hashed Device ID\'s.'),
			'method' => 'textbox',
			'max_length' => '5',
			'size' => '5',
			'default' => '100'
		),
		'rrdp_header' => array(
			'friendly_name' => __('RRDtool Proxy Server'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'rrdp_server' => array(
			'friendly_name' => __('Proxy Server'),
			'description' => __('The DNS hostname or IP address of the RRDtool proxy server.'),
			'method' => 'textbox',
			'max_length' => '255'
		),
		'rrdp_port' => array(
			'friendly_name' => __('Proxy Port Number'),
			'description' => __('TCP port for encrypted communication.'),
			'method' => 'textbox',
			'max_length' => '5',
			'default' => '40301',
			'size' => '5'
		),
		'rrdp_fingerprint' => array(
			'friendly_name' => __('RSA Fingerprint'),
			'description' => __('The fingerprint of the current public RSA key the proxy is using. This is required to establish a trusted connection.'),
			'method' => 'textbox',
			'max_length' => '47',
			'default' => '',
			'size' => '47'
		),
		'rrdp_header2' => array(
			'friendly_name' => __('RRDtool Proxy Server - Backup'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'rrdp_load_balancing' => array(
			'friendly_name' => __('Load Balancing'),
			'description' => __('If both main and backup proxy are receivable this option allows to spread all requests against RRDtool.'),
			'method' => 'checkbox'
		),
		'rrdp_server_backup' => array(
			'friendly_name' => __('Proxy Server'),
			'description' => __('The DNS hostname or IP address of the RRDtool backup proxy server if proxy is running in MSR mode.'),
			'method' => 'textbox',
			'max_length' => '255'
		),
		'rrdp_port_backup' => array(
			'friendly_name' => __('Proxy Port Number'),
			'description' => __('TCP port for encrypted communication with the backup proxy.'),
			'method' => 'textbox',
			'max_length' => '5',
			'default' => '40301',
			'size' => '5'
		),
		'rrdp_fingerprint_backup' => array(
			'friendly_name' => __('RSA Fingerprint'),
			'description' => __('The fingerprint of the current public RSA key the backup proxy is using. This required to establish a trusted connection.'),
			'method' => 'textbox',
			'max_length' => '47',
			'default' => '',
			'size' => '47'
		)
 	),
	'spikes' => array(
		'spikekill_header' => array(
			'friendly_name' => __('Spike Kill Settings'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'spikekill_method' => array(
			'friendly_name' => __('Removal Method'),
			'description' => __('There are two removal methods.  The first, Standard Deviation, will remove any sample that is X number of standard deviations away from the average of samples.  The second method, Variance, will remove any sample that is X% more than the Variance average.  The Variance method takes into account a certain number of \'outliers\'.  Those are exceptional samples, like the spike, that need to be excluded from the Variance Average calculation.'),
			'method' => 'drop_array',
			'default' => '2',
			'array' => array(
				1 => __('Standard Deviation'),
				2 => __('Variance Based w/Outliers Removed')
			)
		),
		'spikekill_avgnan' => array(
			'friendly_name' => __('Replacement Method'),
			'description' => __('There are three replacement methods.  The first method replaces the spike with the average of the data source in question.  The second method replaces the spike with a \'NaN\'.  The last replaces the spike with the last known good value found.'),
			'method' => 'drop_array',
			'default' => 'last',
			'array' => array(
				'avg'  => __('Average'),
				'nan'  => __('NaN\'s'),
				'last' => __('Last Known Good'),
			)
		),
		'spikekill_deviations' => array(
			'friendly_name' => __('Number of Standard Deviations'),
			'description' => __('Any value that is this many standard deviations above the average will be excluded.  A good number will be dependent on the type of data to be operated on.  We recommend a number no lower than 5 Standard Deviations.'),
			'method' => 'drop_array',
			'default' => '10',
			'array' => array(
				3 => __('%d Standard Deviations', 3),
				4 => __('%d Standard Deviations', 4),
				5 => __('%d Standard Deviations', 5),
				6 => __('%d Standard Deviations', 6),
				7 => __('%d Standard Deviations', 7),
				8 => __('%d Standard Deviations', 8),
				9 => __('%d Standard Deviations', 9),
				10 => __('%d Standard Deviations', 10),
				15 => __('%d Standard Deviations', 15),
				20 => __('%d Standard Deviations', 20),
				50 => __('%d Standard Deviations', 50),
				100 => __('%d Standard Deviations', 100),
				200 => __('%d Standard Deviations', 200),
			)
		),
		'spikekill_percent' => array(
			'friendly_name' => __('Variance Percentage'),
			'description' => __('This value represents the percentage above the adjusted sample average once outliers have been removed from the sample.  For example, a Variance Percentage of 100%% on an adjusted average of 50 would remove any sample above the quantity of 100 from the graph.'),
			'method' => 'drop_array',
			'default' => '1000',
			'array' => array(
				100 => '100 %',
				200 => '200 %',
				300 => '300 %',
				400 => '400 %',
				500 => '500 %',
				600 => '600 %',
				700 => '700 %',
				800 => '800 %',
				900 => '900 %',
				1000 => '1000 %',
				2000 => '2000 %',
				3000 => '3000 %',
				10000 => '10000 %',
				50000 => '50000 %',
				100000 => '100000 %',
				500000 => '500000 %',
			)
		),
		'spikekill_outliers' => array(
			'friendly_name' => __('Variance Number of Outliers'),
			'description' => __('This value represents the number of high and low average samples will be removed from the sample set prior to calculating the Variance Average.  If you choose an outlier value of 5, then both the top and bottom 5 averages are removed.'),
			'method' => 'drop_array',
			'default' => '5',
			'array' => array(
				3  => __('%d High/Low Samples', 3),
				4  => __('%d High/Low Samples', 4),
				5  => __('%d High/Low Samples', 5),
				6  => __('%d High/Low Samples', 6),
				7  => __('%d High/Low Samples', 7),
				8  => __('%d High/Low Samples', 8),
				9  => __('%d High/Low Samples', 9),
				10 => __('%d High/Low Samples', 10),
				20 => __('%d High/Low Samples', 20),
				50 => __('%d High/Low Samples', 50),
				100 => __('%d High/Low Samples', 100),
				500 => __('%d High/Low Samples', 500),
				1000 => __('%d High/Low Samples', 1000),
			)
		),
		'spikekill_number' => array(
			'friendly_name' => __('Max Kills Per RRA'),
			'description' => __('This value represents the maximum number of spikes to remove from a Graph RRA.'),
			'method' => 'drop_array',
			'default' => '5',
			'array' => array(
				1  => __('%d Spikes', 1),
				2  => __('%d Spikes', 2),
				3  => __('%d Spikes', 3),
				4  => __('%d Spikes', 4),
				5  => __('%d Spikes', 5),
				6  => __('%d Spikes', 6),
				7  => __('%d Spikes', 7),
				8  => __('%d Spikes', 8),
				9  => __('%d Spikes', 9),
				10 => __('%d Spikes', 10),
				50 => __('%d Spikes', 50),
				100 => __('%d Spikes', 100),
			)
		),
		'spikekill_backupdir' => array(
			'friendly_name' => __('RRDfile Backup Directory'),
			'description' => __('If this directory is not empty, then your original RRDfiles will be backed up to this location.'),
			'method' => 'dirpath',
			'default' => $config['base_path'] . '/cache/spikekill/',
			'max_length' => '255',
			'size' => '60'
		),
		'spikekill_batch_header' => array(
			'friendly_name' => __('Batch Spike Kill Settings'),
			'method' => 'spacer',
			'collapsible' => 'true'
		),
		'spikekill_batch' => array(
			'friendly_name' => __('Removal Schedule'),
			'description' => __('Do you wish to periodically remove spikes from your graphs?  If so, select the frequency below.'),
			'method' => 'drop_array',
			'default' => '0',
			'array' => array(
				0  => __('Disabled'),
				6  => __('Every %d Hours', 6),
				12 => __('Every %d Hours', 12),
				24 => __('Once a Day'),
				48 => __('Every Other Day')
			)
		),
		'spikekill_basetime' => array(
			'friendly_name' => __('Base Time'),
			'description' => __('The Base Time for Spike removal to occur.  For example, if you use \'12:00am\' and you choose once per day, the batch removal would begin at approximately midnight every day.'),
			'method' => 'textbox',
			'default' => '12:00am',
			'max_length' => '10',
			'size' => '10'
		),
		'spikekill_templates' => array(
			'friendly_name' => __('Graph Templates to Spike Kill'),
			'method' => 'drop_multi',
			'description' => __('When performing batch spike removal, only the templates selected below will be acted on.'),
			'array' => array()
		),
		'spikekill_purge' => array(
			'friendly_name' => __('Backup Retention'),
			'description' => __('When SpikeKill kills spikes in graphs, it makes a backup of the RRDfile.  How long should these backup files be retained?'),
			'method' => 'drop_array',
			'default' => '7856352',
			'none_value' => __('Never'),
			'array' => $timespans
		)
	)
);

$settings_user = array(
	'general' => array(
		'selected_theme' => array(
			'friendly_name' => __('Theme'),
			'description' => __('Please select one of the available Themes to skin your Cacti with.'),
			'method' => 'drop_array',
			'default' => read_config_option('selected_theme'),
			'array' => $themes
		),
		'default_view_mode' => array(
			'friendly_name' => __('Default View Mode'),
			'description' => __('Which Graph mode you want displayed by default when you first visit the Graphs page?'),
			'method' => 'drop_array',
			'array' => $graph_views,
			'default' => '1'
		),
		'client_timezone_support' => array(
			'friendly_name' => __('TimeZone Support'),
			'description' => __('How would you like Cacti to present dates?  This setting will also change the way that Cacti Graphs dates are represented.'),
			'method' => 'drop_array',
			'array' => array(
				'0' => __('Cacti Server Timezone'),
				'1' => __('My Browsers Timezone')
			),
			'default' => '0'
		),
		'user_language' => array(
			'friendly_name' => __('User Language'),
			'description' => __('Defines the preferred GUI language.'),
			'method' => 'drop_language',
			'default' => get_new_user_default_language(),
			'array' => get_installed_locales()
		),
		'show_graph_title' => array(
			'friendly_name' => __('Show Graph Title'),
			'description' => __('Display the graph title on the page so that it may be searched using the browser.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'hide_disabled' => array(
			'friendly_name' => __('Hide Disabled'),
			'description' => __('Hides Disabled Devices and Graphs when viewing outside of Console tab.'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'show_aggregates' => array(
			'friendly_name' => __('Show Device Aggregates'),
			'description' => __('If a Device Data Source is included in an Aggregate Graph, show that Graph along with other Device Graphs'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'enable_hscroll' => array(
			'friendly_name' => __('Enable Horizontal Scrolling'),
			'description' => __('Enable Horizontal Scrolling of Tables, Disabling Responsive Column Visibility.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'default_date_format' => array(
			'friendly_name' => __('Date Display Format'),
			'description' => __('The date format to use in Cacti.'),
			'method' => 'drop_array',
			'array' => $dateformats,
			'default' => read_config_option('default_date_format')
		),
		'default_datechar' => array(
			'friendly_name' => __('Date Separator'),
			'description' => __('The date separator to be used in Cacti.'),
			'method' => 'drop_array',
			'array' => $datechar,
			'default' => read_config_option('default_datechar')
		),
		'page_refresh' => array(
			'friendly_name' => __('Page Refresh'),
			'description' => __('The number of seconds between automatic page refreshes.'),
			'method' => 'drop_array',
			'default' => '300',
			'array' => array(
				'15'  => __('%d Seconds', 15),
				'20'  => __('%d Seconds', 20),
				'30'  => __('%d Seconds', 30),
				'60'  => __('1 Minute'),
				'300' => __('%d Minutes', 5)
			)
		),
		'preview_graphs_per_page' => array(
			'friendly_name' => __('Preview Graphs Per Page'),
			'description' => __('The number of graphs to display on one page in preview mode.'),
			'method' => 'drop_array',
			'default' => '10',
			'array' => $graphs_per_page
			)
	),
	'timespan' => array(
		'default_rra_id' => array(
			'friendly_name' => __('Default Time Range'),
			'description' => __('The default RRA to use in rare occasions.'),
			'method' => 'drop_sql',
			'sql' => 'SELECT id, name FROM data_source_profiles_rra ORDER BY steps',
			'default' => '1'
		),
		'default_timespan' => array(
			'friendly_name' => __('Default Timespan'),
			'description' => __('The default Timespan displayed when viewing Graphs and other time specific data.'),
			'method' => 'drop_array',
			'array' => $graph_timespans,
			'default' => GT_LAST_DAY
		),
		'default_timeshift' => array(
			'friendly_name' => __('Default Timeshift'),
			'description' => __('The default Timeshift displayed when viewing Graphs and other time specific data.'),
			'method' => 'drop_array',
			'array' => $graph_timeshifts,
			'default' => GTS_1_DAY
		),
		'allow_graph_dates_in_future' => array(
			'friendly_name' => __('Allow Graph to extend to Future'),
			'description' => __('When displaying Graphs, allow Graph Dates to extend \'to future\''),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'first_weekdayid' => array(
			'friendly_name' => __('First Day of the Week'),
			'description' => __('The first Day of the Week for weekly Graph Displays'),
			'method' => 'drop_array',
			'array' => $graph_weekdays,
			'default' => WD_MONDAY
		),
		'day_shift_start' => array(
			'friendly_name' => __('Start of Daily Shift'),
			'description' => __('Start Time of the Daily Shift.'),
			'method' => 'textbox',
			'default' => '07:00',
			'max_length' => '5',
			'size' => '7'
		),
		'day_shift_end' => array(
			'friendly_name' => __('End of Daily Shift'),
			'description' => __('End Time of the Daily Shift.'),
			'method' => 'textbox',
			'default' => '18:00',
			'max_length' => '5',
			'size' => '7'
		)
	),
	'thumbnail' => array(
		'thumbnail_sections' => array(
			'friendly_name' => __('Thumbnail Sections'),
			'description' => __('Which portions of Cacti display Thumbnails by default.'),
			'method' => 'checkbox_group',
			'items' => array(
				'thumbnail_section_preview' => array(
					'friendly_name' => __('Preview Mode'),
					'default' => 'on'
				),
				'thumbnail_section_tree_2' => array(
					'friendly_name' => __('Tree View'),
					'default' => ''
				)
			)
		),
		'num_columns' => array(
			'friendly_name' => __('Preview Thumbnail Columns'),
			'description' => __('The number of columns to use when displaying Thumbnail graphs in Preview mode.'),
			'method' => 'drop_array',
			'default' => '2',
			'array' => array(
				'1' => __('1 Column'),
				'2' => __('%d Columns', 2),
				'3' => __('%d Columns', 3),
				'4' => __('%d Columns', 4),
				'5' => __('%d Columns', 5),
				'6' => __('%d Columns', 6)
			)
		),
		'num_columns_tree' => array(
			'friendly_name' => __('Tree View Thumbnail Columns'),
			'description' => __('The number of columns to use when displaying Thumbnail graphs in Tree mode.'),
			'method' => 'drop_array',
			'default' => '2',
			'array' => array(
				'1' => __('1 Column'),
				'2' => __('%d Columns', 2),
				'3' => __('%d Columns', 3),
				'4' => __('%d Columns', 4),
				'5' => __('%d Columns', 5),
				'6' => __('%d Columns', 6)
			)
		),
		'default_height' => array(
			'friendly_name' => __('Thumbnail Height'),
			'description' => __('The height of Thumbnail graphs in pixels.'),
			'method' => 'textbox',
			'default' => '100',
			'max_length' => '10',
			'size' => '7'
		),
		'default_width' => array(
			'friendly_name' => __('Thumbnail Width'),
			'description' => __('The width of Thumbnail graphs in pixels.'),
			'method' => 'textbox',
			'default' => '300',
			'max_length' => '10',
			'size' => '7'
		)
	),
	'tree' => array(
		'default_tree_id' => array(
			'friendly_name' => __('Default Tree'),
			'description' => __('The default graph tree to use when displaying graphs in tree mode.'),
			'method' => 'drop_sql',
			'sql' => 'SELECT id,name FROM graph_tree ORDER BY name',
			'default' => '0'
		),
		'treeview_graphs_per_page' => array(
			'friendly_name' => __('Graphs Per Page'),
			'description' => __('The number of graphs to display on one page in preview mode.'),
			'method' => 'drop_array',
			'default' => '10',
			'array' => $graphs_per_page
		),
		'expand_hosts' => array(
			'friendly_name' => __('Expand Devices'),
			'description' => __('Choose whether to expand the Graph Templates and Data Queries used by a Device on Tree.'),
			'method' => 'checkbox',
			'default' => ''
		),
		'tree_history' => array(
			'friendly_name' => __('Tree History'),
			'description' => __('If enabled, Cacti will remember your Tree History between logins and when you return to the Graphs page.'),
			'method' => 'checkbox',
			'default' => 'on'
		),
		'min_tree_width' => array(
			'friendly_name' => __('Minimum Tree Width'),
			'description' => __('The Minimum width of the Tree to contract to.'),
			'method' => 'textbox',
			'default' => read_config_option('min_tree_width'),
			'max_length' => '5',
			'size' => '7'
		),
		'max_tree_width' => array(
			'friendly_name' => __('Maximum Tree Width'),
			'description' => __('The Maximum width of the Tree to expand to, after which time, Tree branches will scroll on the page.'),
			'method' => 'textbox',
			'default' => read_config_option('max_tree_width'),
			'max_length' => '5',
			'size' => '7'
		)
	),
	'fonts' => array(
		'custom_fonts' => array(
			'friendly_name' => __('Use Custom Fonts'),
			'description' => __('Choose whether to use your own custom fonts and font sizes or utilize the system defaults.'),
			'method' => 'checkbox',
			'on_change' => 'graphSettings()',
			'default' => ''
		),
		'title_size' => array(
			'friendly_name' => __('Title Font Size'),
			'description' => __('The size of the font used for Graph Titles'),
			'method' => 'textbox',
			'default' => '12',
			'max_length' => '10'
		),
		'title_font' => array(
			'friendly_name' => __('Title Font File'),
			'description' => __('The font file to use for Graph Titles'),
			'method' => 'font',
			'max_length' => '100'
		),
		'legend_size' => array(
			'friendly_name' => __('Legend Font Size'),
			'description' => __('The size of the font used for Graph Legend items'),
			'method' => 'textbox',
			'default' => '10',
			'max_length' => '10'
		),
		'legend_font' => array(
			'friendly_name' => __('Legend Font File'),
			'description' => __('The font file to be used for Graph Legend items'),
			'method' => 'font',
			'max_length' => '100'
		),
		'axis_size' => array(
			'friendly_name' => __('Axis Font Size'),
			'description' => __('The size of the font used for Graph Axis'),
			'method' => 'textbox',
			'default' => '8',
			'max_length' => '10'
		),
		'axis_font' => array(
			'friendly_name' => __('Axis Font File'),
			'description' => __('The font file to be used for Graph Axis items'),
			'method' => 'font',
			'max_length' => '100'
		),
		'unit_size' => array(
			'friendly_name' => __('Unit Font Size'),
			'description' => __('The size of the font used for Graph Units'),
			'method' => 'textbox',
			'default' => '8',
			'max_length' => '10'
		),
		'unit_font' => array(
			'friendly_name' => __('Unit Font File'),
			'description' => __('The font file to be used for Graph Unit items'),
			'method' => 'font',
			'max_length' => '100'
		)
	)
);

if ($config['cacti_server_os'] == 'win32') {
	unset($settings['mail']['settings_sendmail_header']);
	unset($settings['mail']['settings_sendmail_path']);
}

if (!$config['is_web'] || is_realm_allowed(25)) {
	$settings_user['general']['realtime_mode'] = array(
		'friendly_name' => __('Realtime View Mode'),
		'description' => __('How do you wish to view Realtime Graphs?'),
		'method' => 'drop_array',
		'array' => array(
			'1' => __('Inline'),
			'2' => __('New Window')
		),
		'default' => '1'
	);
}

if (!$config['is_web'] || is_realm_allowed(8)) {
	if (read_config_option('auth_method') != 2 && !(read_config_option('auth_cache_enabled') == 'on' && isset($_SESSION['cacti_remembers']) && $_SESSION['cacti_remembers'] == true)) {
		if (ini_get('session.gc_maxlifetime') > '2147483') {
			$max_life = '2147483';
		} else {
			$max_life = ini_get('session.gc_maxlifetime');
		}

		$auto_array = array(
			'-1'      => __('System Setting'),
			'900'     => __('%d Minutes', 15),
			'1200'    => __('%d Minutes', 20),
			'1800'    => __('%d Minutes', 30),
			'3600'    => __('1 Hour'),
			'21600'   => __('%d Hours', 6),
			'43200'   => __('%d Hours', 12),
			'86400'   => __('1 Day'),
			'604800'  => __('1 Week'),
			'1209600' => __('%d Weeks', 2),
			'1814400' => __('%d Weeks', 3),
			'2147483' => __('%d Weeks', 4)
		);

		foreach($auto_array as $key => $value) {
			if ($key > $max_life) {
				unset($auto_array[$key]);
			}
		}

		$settings_user['general']['user_auto_logout_time'] = array(
			'friendly_name' => __('Auto Log Out Time'),
			'description' => __('For users with Console access only, how long this user can stay logged in before being automatically logged out.  Note that if you have not been active in more than an hour, you may have to refresh your browser.  Also note that this setting has no affect when Authentication Cookies are enabled.'),
			'method' => 'drop_array',
			'default' => $max_life,
			'array' => $auto_array
		);
	}
}

api_plugin_hook('config_settings');