/
global_arrays.php
3040 lines (2884 loc) · 89.3 KB
/
global_arrays.php
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
<?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/ |
+-------------------------------------------------------------------------+
*/
global $menu, $menu_glyphs, $graph_sources;
/* Array of Cacti versions and template hash codes
Remember to add every version here. */
$cacti_version_codes = array(
'0.8' => 'NaN',
'0.8.1' => 'NaN',
'0.8.2' => 'NaN',
'0.8.2a' => 'NaN',
'0.8.3' => 'NaN',
'0.8.3a' => 'NaN',
'0.8.4' => '0000',
'0.8.5' => '0001',
'0.8.5a' => '0002',
'0.8.6' => '0003',
'0.8.6a' => '0004',
'0.8.6b' => '0005',
'0.8.6c' => '0006',
'0.8.6d' => '0007',
'0.8.6e' => '0008',
'0.8.6f' => '0009',
'0.8.6g' => '0010',
'0.8.6h' => '0011',
'0.8.6i' => '0012',
'0.8.6j' => '0013',
'0.8.7' => '0014',
'0.8.7a' => '0015',
'0.8.7b' => '0016',
'0.8.7c' => '0017',
'0.8.7d' => '0018',
'0.8.7e' => '0019',
'0.8.7f' => '0020',
'0.8.7g' => '0021',
'0.8.7h' => '0022',
'0.8.7i' => '0023',
'0.8.8' => '0024',
'0.8.8a' => '0024',
'0.8.8b' => '0024',
'0.8.8c' => '0025',
'0.8.8d' => '0025',
'0.8.8e' => '0025',
'0.8.8f' => '0025',
'0.8.8g' => '0025',
'0.8.8h' => '0025',
'1.0.0' => '0100',
'1.0.1' => '0100',
'1.0.2' => '0100',
'1.0.3' => '0100',
'1.0.4' => '0100',
'1.0.5' => '0100',
'1.0.6' => '0100',
'1.1.0' => '0100',
'1.1.1' => '0100',
'1.1.2' => '0100',
'1.1.3' => '0100',
'1.1.4' => '0100',
'1.1.5' => '0100',
'1.1.6' => '0101',
'1.1.7' => '0101',
'1.1.8' => '0101',
'1.1.9' => '0101',
'1.1.10' => '0101',
'1.1.11' => '0101',
'1.1.12' => '0101',
'1.1.13' => '0101',
'1.1.14' => '0101',
'1.1.15' => '0101',
'1.1.16' => '0101',
'1.1.17' => '0101',
'1.1.18' => '0101',
'1.1.19' => '0101',
'1.1.20' => '0101',
'1.1.21' => '0101',
'1.1.22' => '0101',
'1.1.23' => '0101',
'1.1.24' => '0101',
'1.1.25' => '0101',
'1.1.26' => '0101',
'1.1.27' => '0101',
'1.1.28' => '0101',
'1.1.29' => '0101',
'1.1.30' => '0101',
'1.1.31' => '0101',
'1.1.32' => '0101',
'1.1.33' => '0101',
'1.1.34' => '0101',
'1.1.35' => '0101',
'1.1.36' => '0101',
'1.1.37' => '0101',
'1.1.38' => '0101',
'1.2.0' => '0101',
'1.2.1' => '0101',
'1.2.2' => '0101',
'1.2.3' => '0102',
'1.2.4' => '0102',
'1.2.5' => '0102',
'1.2.6' => '0102',
'1.2.7' => '0102',
'1.2.8' => '0102',
'1.2.9' => '0102',
'1.2.10' => '0102',
'1.2.11' => '0102',
'1.2.12' => '0102',
'1.2.13' => '0102',
'1.2.14' => '0102',
'1.2.15' => '0102',
'1.2.16' => '0102',
'1.2.17' => '0102',
'1.2.18' => '0102',
'1.2.19' => '0103',
'1.2.20' => '0103',
'1.2.21' => '0103',
'1.2.22' => '0103',
'1.2.23' => '0103',
'1.2.24' => '0103',
'1.2.25' => '0103',
'1.2.26' => '0103',
'1.3.0' => '0104',
);
$messages = array(
1 => array(
'message' => __('Save Successful.'),
'level' => MESSAGE_LEVEL_INFO),
2 => array(
'message' => __('Save Failed.'),
'level' => MESSAGE_LEVEL_ERROR),
3 => array(
'message' => __('Save Failed due to field input errors (Check red fields).'),
'level' => MESSAGE_LEVEL_ERROR),
4 => array(
'message' => __('Passwords do not match, please retype.'),
'level' => MESSAGE_LEVEL_ERROR),
5 => array(
'message' => __('You must select at least one field.'),
'level' => MESSAGE_LEVEL_ERROR),
6 => array(
'message' => __('You must have built in user authentication turned on to use this feature.'),
'level' => MESSAGE_LEVEL_ERROR),
7 => array(
'message' => __('XML parse error.'),
'level' => MESSAGE_LEVEL_ERROR),
8 => array(
'message' => __('The directory highlighted does not exist. Please enter a valid directory.'),
'level' => MESSAGE_LEVEL_ERROR),
9 => array(
'message' => __('The Cacti log file must have the extension \'.log\''),
'level' => MESSAGE_LEVEL_ERROR),
10 => array(
'message' => __('Data Input for method does not appear to be whitelisted.'),
'level' => MESSAGE_LEVEL_ERROR),
11 => array(
'message' => __('Data Source does not exist.'),
'level' => MESSAGE_LEVEL_ERROR),
12 => array(
'message' => __('Username already in use.'),
'level' => MESSAGE_LEVEL_ERROR),
13 => array(
'message' => __('The SNMP v3 Privacy Passphrases do not match'),
'level' => MESSAGE_LEVEL_ERROR),
14 => array(
'message' => __('The SNMP v3 Authentication Passphrases do not match'),
'level' => MESSAGE_LEVEL_ERROR),
15 => array(
'message' => __('XML: Cacti version does not exist.'),
'level' => MESSAGE_LEVEL_ERROR),
16 => array(
'message' => __('XML: Hash version does not exist.'),
'level' => MESSAGE_LEVEL_ERROR),
17 => array(
'message' => __('XML: Generated with a newer version of Cacti.'),
'level' => MESSAGE_LEVEL_ERROR),
18 => array(
'message' => __('XML: Cannot locate type code.'),
'level' => MESSAGE_LEVEL_ERROR),
19 => array(
'message' => __('Username already exists.'),
'level' => MESSAGE_LEVEL_ERROR),
20 => array(
'message' => __('Username change not permitted for designated template or guest user.'),
'level' => MESSAGE_LEVEL_ERROR),
21 => array(
'message' => __('User delete not permitted for designated template or guest user.'),
'level' => MESSAGE_LEVEL_ERROR),
22 => array(
'message' => __('User delete not permitted for designated graph export user.'),
'level' => MESSAGE_LEVEL_ERROR),
23 => array(
'message' => __('Data Template includes deleted Data Source Profile. Please resave the Data Template with an existing Data Source Profile.'),
'level' => MESSAGE_LEVEL_ERROR),
24 => array(
'message' => __('Graph Template includes deleted GPrint Prefix. Please run database repair script to identify and/or correct.'),
'level' => MESSAGE_LEVEL_ERROR),
25 => array(
'message' => __('Graph Template includes deleted CDEFs. Please run database repair script to identify and/or correct.'),
'level' => MESSAGE_LEVEL_ERROR),
26 => array(
'message' => __('Graph Template includes deleted Data Input Method. Please run database repair script to identify.'),
'level' => MESSAGE_LEVEL_ERROR),
27 => array(
'message' => __('Data Template not found during Export. Please run database repair script to identify.'),
'level' => MESSAGE_LEVEL_ERROR),
28 => array(
'message' => __('Device Template not found during Export. Please run database repair script to identify.'),
'level' => MESSAGE_LEVEL_ERROR),
29 => array(
'message' => __('Data Query not found during Export. Please run database repair script to identify.'),
'level' => MESSAGE_LEVEL_ERROR),
30 => array(
'message' => __('Graph Template not found during Export. Please run database repair script to identify.'),
'level' => MESSAGE_LEVEL_ERROR),
31 => array(
'message' => __('Graph not found. Either it has been deleted or your database needs repair.'),
'level' => MESSAGE_LEVEL_ERROR),
32 => array(
'message' => __('SNMPv3 Auth Passphrases must be 8 characters or greater.'),
'level' => MESSAGE_LEVEL_ERROR),
33 => array(
'message' => __('Some Graphs not updated. Unable to change device for Data Query based Graphs.'),
'level' => MESSAGE_LEVEL_ERROR),
34 => array(
'message' => __('Unable to change device for Data Query based Graphs.'),
'level' => MESSAGE_LEVEL_ERROR),
35 => array(
'message' => __('Some settings not saved. Check messages below. Check red fields for errors.'),
'level' => MESSAGE_LEVEL_ERROR),
36 => array(
'message' => __('The file highlighted does not exist. Please enter a valid file name.'),
'level' => MESSAGE_LEVEL_ERROR),
37 => array(
'message' => __('All User Settings have been returned to their default values.'),
'level' => MESSAGE_LEVEL_INFO),
38 => array(
'message' => __('Suggested Field Name was not entered. Please enter a field name and try again.'),
'level' => MESSAGE_LEVEL_ERROR),
39 => array(
'message' => __('Suggested Value was not entered. Please enter a suggested value and try again.'),
'level' => MESSAGE_LEVEL_ERROR),
40 => array(
'message' => __('You must select at least one object from the list.'),
'level' => MESSAGE_LEVEL_ERROR),
41 => array(
'message' => __('Device Template updated. Remember to Sync Devices to push all changes to Devices that use this Device Template.'),
'level' => MESSAGE_LEVEL_INFO),
42 => array(
'message' => __('Save Successful. Settings replicated to Remote Data Collectors.'),
'level' => MESSAGE_LEVEL_INFO),
43 => array(
'message' => __('Save Failed. Minimum Values must be less than Maximum Value.'),
'level' => MESSAGE_LEVEL_ERROR),
44 => array(
'message' => __('Unable to change password. User account not found.'),
'level' => MESSAGE_LEVEL_ERROR),
'input_save_wo_ds' => array(
'message' => __('Data Input Saved. You must update the Data Templates referencing this Data Input Method before creating Graphs or Data Sources.'),
'level' => MESSAGE_LEVEL_INFO),
'input_save_w_ds' => array(
'message' => __('Data Input Saved. You must update the Data Templates referencing this Data Input Method before the Data Collectors will start using any new or modified Data Input - Input Fields.'),
'level' => MESSAGE_LEVEL_INFO),
'input_field_save_wo_ds' => array(
'message' => __('Data Input Field Saved. You must update the Data Templates referencing this Data Input Method before creating Graphs or Data Sources.'),
'level' => MESSAGE_LEVEL_INFO),
'input_field_save_w_ds' => array(
'message' => __('Data Input Field Saved. You must update the Data Templates referencing this Data Input Method before the Data Collectors will start using any new or modified Data Input - Input Fields.'),
'level' => MESSAGE_LEVEL_INFO),
'clog_invalid' => array(
'message' => __('Log file specified is not a Cacti log or archive file.'),
'level' => MESSAGE_LEVEL_INFO),
'clog_remove' => array(
'message' => __('Log file specified was Cacti archive file and was removed.'),
'level' => MESSAGE_LEVEL_INFO),
'clog_purged' => array(
'message' => __('Cacti log purged successfully'),
'level' => MESSAGE_LEVEL_INFO),
'password_change' => array(
'message' => __('If you force a password change, you must also allow the user to change their password.'),
'level' => MESSAGE_LEVEL_ERROR),
'nopassword' => array(
'message' => __('You are not allowed to change your password.'),
'level' => MESSAGE_LEVEL_ERROR),
'nopasswordlen' => array(
'message' => __('Unable to determine size of password field, please check permissions of db user'),
'level' => MESSAGE_LEVEL_ERROR),
'nopasswordinc' => array(
'message' => __('Unable to increase size of password field, pleas check permission of db user'),
'level' => MESSAGE_LEVEL_ERROR),
'nodomainpassword' => array(
'message' => __('LDAP/AD based password change not supported.'),
'level' => MESSAGE_LEVEL_ERROR),
'password_success' => array(
'message' => __('Password successfully changed.'),
'level' => MESSAGE_LEVEL_INFO),
'clog_permissions' => array(
'message' => __('Unable to clear log, no write permissions'),
'level' => MESSAGE_LEVEL_ERROR),
'clog_missing' => array(
'message' => __('Unable to clear log, file does not exist'),
'level' => MESSAGE_LEVEL_ERROR),
'csrf_timeout' => array(
'message' => __('CSRF Timeout, refreshing page.'),
'level' => MESSAGE_LEVEL_CSRF),
'csrf_ptimeout' => array(
'message' => __('CSRF Timeout occurred due to inactivity, page refreshed.'),
'level' => MESSAGE_LEVEL_ERROR),
'mg_mailtime_invalid' => array(
'message' => __('Invalid timestamp. Select timestamp in the future.'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_sync' => array(
'message' => __('Data Collector(s) synchronized for offline operation'),
'level' => MESSAGE_LEVEL_INFO),
'poller_notfound' => array(
'message' => __('Data Collector(s) not found when attempting synchronization'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_noconnect' => array(
'message' => __('Unable to establish MySQL connection with Remote Data Collector.'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_nosync' => array(
'message' => __('Data Collector synchronization must be initiated from the main Cacti server.'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_nomain' => array(
'message' => __('Synchronization does not include the Central Cacti Database server.'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_nodupe' => array(
'message' => __('When saving a Remote Data Collector, the Database Hostname must be unique from all others.'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_dbhost' => array(
'message' => __('Your Remote Database Hostname must be something other than \'localhost\' for each Remote Data Collector.'),
'level' => MESSAGE_LEVEL_ERROR),
'poller_paths' => array(
'message' => __('Path variables on this page were only saved locally.'),
'level' => MESSAGE_LEVEL_INFO),
'reports_save' => array(
'message' => __('Report Saved'),
'level' => MESSAGE_LEVEL_INFO),
'reports_save_failed' => array(
'message' => __('Report Save Failed'),
'level' => MESSAGE_LEVEL_ERROR),
'reports_item_save' => array(
'message' => __('Report Item Saved'),
'level' => MESSAGE_LEVEL_INFO),
'reports_item_save_failed' => array(
'message' => __('Report Item Save Failed'),
'level' => MESSAGE_LEVEL_ERROR),
'reports_graph_not_found' => array(
'message' => __('Graph was not found attempting to Add to Report'),
'level' => MESSAGE_LEVEL_ERROR),
'reports_not_owner' => array(
'message' => __('Unable to Add Graphs. Current user is not owner'),
'level' => MESSAGE_LEVEL_ERROR),
'reports_add_error' => array(
'message' => __('Unable to Add all Graphs. See error message for details.'),
'level' => MESSAGE_LEVEL_ERROR),
'reports_no_graph' => array(
'message' => __('You must select at least one Graph to add to a Report.'),
'level' => MESSAGE_LEVEL_ERROR),
'reports_graphs_added' => array(
'message' => __('All Graphs have been added to the Report. Duplicate Graphs with the same Timespan were skipped.'),
'level' => MESSAGE_LEVEL_INFO),
'resource_cache_rebuild' => array(
'message' => __('Poller Resource Cache cleared. Main Data Collector will rebuild at the next poller start, and Remote Data Collectors will sync afterwards.'),
'level' => MESSAGE_LEVEL_INFO),
'permission_denied' => array(
'message' => __('Permission Denied. You do not have permission to the requested action.'),
'level' => MESSAGE_LEVEL_ERROR),
'page_not_defined' => array(
'message' => __('Page is not defined. Therefore, it can not be displayed.'),
'level' => MESSAGE_LEVEL_ERROR),
'custom_error' => array(
'message' => __('Unexpected error occurred'),
'level' => MESSAGE_LEVEL_ERROR)
);
$cdef_operators = array(1 =>
'+',
'-',
'*',
'/',
'%'
);
$cdef_functions = array(1 =>
'SIN',
'COS',
'LOG',
'EXP',
'FLOOR',
'CEIL',
'LT',
'LE',
'GT',
'GE',
'EQ',
'IF',
'MIN',
'MAX',
'LIMIT',
'DUP',
'EXC',
'POP',
'UN',
'UNKN',
'PREV',
'INF',
'NEGINF',
'NOW',
'TIME',
'LTIME',
'ADDNAN',
'TREND',
'TRENDNAN',
'PREDICT',
'PREDICTSIGMA',
'PREDICTPERC',
'SQRT',
'ATAN',
'ATAN2',
'POW',
'ISINF',
'MINNAN',
'MAXNAN',
'DEG2RAD',
'RAD2DEG',
'ABS',
'REV',
'SMIN',
'SMAX',
'MEDIAN',
'STDEV',
'PERCENT',
'COUNT',
'STEPWIDTH',
'NEWDAY',
'NEWWEEK',
'NEWMONTH',
'NEWYEAR',
'DEPTH',
'COPY',
'INDEX',
'ROLL'
);
$phperrors = array(
E_ERROR => 'ERROR',
E_WARNING => 'WARNING',
E_PARSE => 'PARSE',
E_NOTICE => 'NOTICE',
E_CORE_ERROR => 'CORE_ERROR',
E_CORE_WARNING => 'CORE_WARNING',
E_COMPILE_ERROR => 'COMPILE_ERROR',
E_COMPILE_WARNING => 'COMPILE_WARNING',
E_USER_ERROR => 'USER_ERROR',
E_USER_WARNING => 'USER_WARNING',
E_USER_NOTICE => 'USER_NOTICE',
E_STRICT => 'STRICT',
E_RECOVERABLE_ERROR => 'RECOVERABLE_ERROR',
E_DEPRECATED => 'DEPRECATED',
E_USER_DEPRECATED => 'USER_DEPRECATED',
E_ALL => 'ALL'
);
if (cacti_version_compare(get_rrdtool_version(), '1.8.0', '>=')) {
$cdef_functions[] = 'ROUND';
}
$vdef_functions = array(1 =>
'MAXIMUM',
'MINIMUM',
'AVERAGE',
'STDEV',
'LAST',
'FIRST',
'TOTAL',
'PERCENT',
'PERCENTNAN',
'LSLSLOPE',
'LSLINT',
'LSLCORREL'
);
$vdef_item_types = array(
CVDEF_ITEM_TYPE_FUNCTION => __('Function'),
CVDEF_ITEM_TYPE_SPEC_DS => __('Special Data Source'),
CVDEF_ITEM_TYPE_STRING => __('Custom String'),
);
$custom_vdef_data_source_types = array( // this may change as soon as RRDtool supports math in VDEF, until then only reference to CDEF may help
'CURRENT_DATA_SOURCE' => __('Current Graph Item Data Source'),
);
$input_types = array(
DATA_INPUT_TYPE_SNMP => __('SNMP Get'), // Action 0:
DATA_INPUT_TYPE_SNMP_QUERY => __('SNMP Query'),
DATA_INPUT_TYPE_SCRIPT => __('Script/Command'), // Action 1:
DATA_INPUT_TYPE_SCRIPT_QUERY => __('Script Query'), // Action 1:
DATA_INPUT_TYPE_PHP_SCRIPT_SERVER => __('Script Server'),
DATA_INPUT_TYPE_QUERY_SCRIPT_SERVER => __('Script Server Query'),
DATA_INPUT_TYPE_STREAM => __('Stream Data')
);
$input_types_script = array(
DATA_INPUT_TYPE_SCRIPT => __('Script/Command'), // Action 1:
DATA_INPUT_TYPE_PHP_SCRIPT_SERVER => __('Script Server'),
);
$reindex_types = array(
DATA_QUERY_AUTOINDEX_NONE => __('None'),
DATA_QUERY_AUTOINDEX_BACKWARDS_UPTIME => __('Uptime'),
DATA_QUERY_AUTOINDEX_INDEX_NUM_CHANGE => __('Index Count'),
DATA_QUERY_AUTOINDEX_FIELD_VERIFICATION => __('Verify All')
);
$reindex_types_tips = array(
DATA_QUERY_AUTOINDEX_NONE => __('All Re-Indexing will be manual or managed through scripts or Device Automation.'),
DATA_QUERY_AUTOINDEX_BACKWARDS_UPTIME => __('When the Devices SNMP uptime goes backward, a Re-Index will be performed.'),
DATA_QUERY_AUTOINDEX_INDEX_NUM_CHANGE => __('When the Data Query index count changes, a Re-Index will be performed.'),
DATA_QUERY_AUTOINDEX_FIELD_VERIFICATION => __('Every polling cycle, a Re-Index will be performed. Very expensive.')
);
$snmp_query_field_actions = array(1 =>
__('SNMP Field Name (Dropdown)'),
__('SNMP Field Value (From User)'),
__('SNMP Output Type (Dropdown)')
);
$consolidation_functions = array(1 =>
'AVERAGE',
'MIN',
'MAX',
'LAST'
);
$data_source_types = array(
1 => 'GAUGE',
2 => 'COUNTER',
3 => 'DERIVE',
4 => 'ABSOLUTE',
5 => 'COMPUTE'
);
if (cacti_version_compare(get_rrdtool_version(), '1.5', '>=')) {
$data_source_types[6] = 'DCOUNTER';
$data_source_types[7] = 'DDERIVE';
}
$rrd_font_render_modes = array(
RRD_FONT_RENDER_NORMAL => __('Normal'),
RRD_FONT_RENDER_LIGHT => __('Light'),
RRD_FONT_RENDER_MONO => __('Mono'),
);
$rrd_graph_render_modes = array(
RRD_GRAPH_RENDER_NORMAL => __('Normal'),
RRD_GRAPH_RENDER_MONO => __('Mono'),
);
$rrd_legend_position = array(
RRD_LEGEND_POS_NORTH => __('North'),
RRD_LEGEND_POS_SOUTH => __('South'),
RRD_LEGEND_POS_WEST => __('West'),
RRD_LEGEND_POS_EAST => __('East'),
);
$rrd_textalign = array(
RRD_ALIGN_NONE => __('None'),
RRD_ALIGN_LEFT => __('Left'),
RRD_ALIGN_RIGHT => __('Right'),
RRD_ALIGN_JUSTIFIED => __('Justified'),
RRD_ALIGN_CENTER => __('Center'),
);
$rrd_legend_direction = array(
RRD_LEGEND_DIR_TOPDOWN => __('Top -> Down'),
RRD_LEGEND_DIR_BOTTOMUP => __('Bottom -> Up'),
);
$rrd_axis_formatters = array(
'numeric' => __('Numeric'),
'timestamp' => __('Timestamp'),
'duration' => __('Duration')
);
$graph_item_types = array(
GRAPH_ITEM_TYPE_COMMENT => 'COMMENT',
GRAPH_ITEM_TYPE_HRULE => 'HRULE',
GRAPH_ITEM_TYPE_VRULE => 'VRULE',
GRAPH_ITEM_TYPE_LINE1 => 'LINE1',
GRAPH_ITEM_TYPE_LINE2 => 'LINE2',
GRAPH_ITEM_TYPE_LINE3 => 'LINE3',
GRAPH_ITEM_TYPE_AREA => 'AREA',
GRAPH_ITEM_TYPE_STACK => 'AREA:STACK',
GRAPH_ITEM_TYPE_GPRINT => 'GPRINT',
GRAPH_ITEM_TYPE_GPRINT_AVERAGE => 'GPRINT:AVERAGE',
GRAPH_ITEM_TYPE_GPRINT_LAST => 'GPRINT:LAST',
GRAPH_ITEM_TYPE_GPRINT_MAX => 'GPRINT:MAX',
GRAPH_ITEM_TYPE_GPRINT_MIN => 'GPRINT:MIN',
GRAPH_ITEM_TYPE_LEGEND => 'LEGEND',
GRAPH_ITEM_TYPE_LEGEND_CAMM => 'LEGEND_CAMM',
GRAPH_ITEM_TYPE_LINESTACK => 'LINE:STACK',
GRAPH_ITEM_TYPE_TIC => 'TICK',
GRAPH_ITEM_TYPE_TEXTALIGN => 'TEXTALIGN',
);
asort($graph_item_types);
$image_types = array(
1 => 'PNG',
3 => 'SVG'
);
$snmp_security_levels = array(
'noAuthNoPriv' => 'noAuthNoPriv',
'authNoPriv' => 'authNoPriv',
'authPriv' => 'authPriv'
);
$snmp_versions = array(0 =>
__('Not In Use'),
__('Version %d', 1),
__('Version %d', 2),
__('Version %d', 3)
);
$snmp_auth_protocols = array(
'[None]' => __('[None]'),
'MD5' => __('MD5'),
'SHA' => __('SHA'),
'SHA224' => __('SHA-224'),
'SHA256' => __('SHA-256'),
'SHA392' => __('SHA-392'),
'SHA512' => __('SHA-512'),
);
$snmp_priv_protocols = array(
'[None]' => __('[None]'),
'DES' => __('DES'),
'AES' => __('AES'),
'AES128' => __('AES-128'),
'AES192' => __('AES-192'),
'AES192C' => __('AES-192-C'),
'AES256' => __('AES-256'),
'AES256C' => __('AES-256-C')
);
$banned_snmp_strings = array(
'End of MIB',
'No Such'
);
$logfile_options = array(1 =>
__('Logfile Only'),
__('Logfile and Syslog/Eventlog'),
__('Syslog/Eventlog Only')
);
$availability_options = array(
AVAIL_NONE => __('None'),
AVAIL_SNMP_AND_PING => __('Ping and SNMP Uptime'),
AVAIL_SNMP_OR_PING => __('Ping or SNMP Uptime'),
AVAIL_SNMP => __('SNMP Uptime'),
AVAIL_SNMP_GET_SYSDESC => __('SNMP Desc'),
AVAIL_SNMP_GET_NEXT => __('SNMP getNext'),
AVAIL_PING => __('Ping')
);
$ping_methods = array(
PING_ICMP => __('ICMP Ping'),
PING_TCP => __('TCP Ping'),
PING_UDP => __('UDP Ping')
);
$logfile_verbosity = array(
POLLER_VERBOSITY_NONE => __('NONE - Syslog Only if Selected'),
POLLER_VERBOSITY_LOW => __('LOW - Statistics and Errors'),
POLLER_VERBOSITY_MEDIUM => __('MEDIUM - Statistics, Errors and Results'),
POLLER_VERBOSITY_HIGH => __('HIGH - Statistics, Errors, Results and Major I/O Events'),
POLLER_VERBOSITY_DEBUG => __('DEBUG - Statistics, Errors, Results, I/O and Program Flow'),
POLLER_VERBOSITY_DEVDBG => __('DEVEL - Developer DEBUG Level')
);
$logfile_expansion = array(
LOG_EXPAND_NONE => ('NONE - No expansion'),
LOG_EXPAND_DISPLAY => ('DISPLAY - Only when displaying'),
LOG_EXPAND_FULL => ('FULL - Display and search expansion'),
);
$logfile_validation = array(
INPUT_VALIDATION_NONE => ('NONE - No reporting'),
INPUT_VALIDATION_LOG => ('LOG - Only record to log'),
INPUT_VALIDATION_FULL => ('FULL - Display and log'),
);
$poller_options = array(
1 => 'cmd.php',
2 => 'spine'
);
if (read_config_option('path_spine') != '' && (!file_exists(read_config_option('path_spine')) || !is_executable(read_config_option('path_spine')))) {
unset($poller_options[2]);
}
$aggregation_levels = array(
1 => __('Selected Poller Interval'),
30 => __('%d Seconds', 30),
60 => __('1 Minute'),
300 => __('%d Minutes', 5),
600 => __('%d Minutes', 10),
900 => __('%d Minutes', 15),
1800 => __('%d Minutes', 30),
3600 => __('1 Hour'),
7200 => __('%d Hours', 2),
10800 => __('%d Hours', 3),
14400 => __('%d Hours', 4),
21600 => __('%d Hours', 6),
43200 => __('%d Hours', 12),
86400 => __('%d Day', 1),
604800 => __('%d Week', 1)
);
$sampling_intervals = array(
10 => __('Every %d Seconds', 10),
15 => __('Every %d Seconds', 15),
20 => __('Every %d Seconds', 20),
30 => __('Every %d Seconds', 30),
60 => __('Every Minute'),
300 => __('Every %d Minutes', 5),
600 => __('Every %d Minutes', 10),
900 => __('Every %d Minutes', 15),
1200 => __('Every %d Minutes', 20),
1800 => __('Every %d Minutes', 30),
3600 => __('Every Hour'),
7200 => __('Every %d Hours', 2),
14400 => __('Every %d Hours', 4),
28800 => __('Every %d Hours', 8),
43200 => __('Every %d Hours', 12),
86400 => __('Every %d Day', 1)
);
$heartbeats = array(
20 => __('%d Seconds', 20),
30 => __('%d Seconds', 30),
40 => __('%d Seconds', 40),
45 => __('%d Seconds', 45),
60 => __('%d Seconds', 60),
90 => __('%d Seconds', 90),
120 => __('%d Minutes', 2),
300 => __('%d Minutes', 5),
330 => __('%0.1f Minutes', 5.5),
600 => __('%d Minutes', 10),
660 => __('%d Minutes', 11),
900 => __('%d Minutes', 15),
1200 => __('%d Minutes', 20),
1800 => __('%d Minutes', 30),
2400 => __('%d Minutes', 40),
3600 => __('%d Hour', 1),
7200 => __('%d Hours', 2),
14400 => __('%d Hours', 4),
28800 => __('%d Hours', 8),
57600 => __('%d Hours', 16),
86400 => __('%d Day', 1),
172800 => __('%d Days', 2)
);
$timespans = array(
3600 => __('%d Hour', 1),
7200 => __('%d Hours', 2),
14400 => __('%d Hours', 4),
21600 => __('%d Hours', 6),
43200 => __('%d Hours', 12),
86400 => __('%d Day', 1),
172800 => __('%d Days', 2),
345600 => __('%d Days', 4),
604800 => __('%d Week', 1),
1209600 => __('%d Weeks', 2),
1814400 => __('%d Weeks', 3),
2618784 => __('%d Month', 1),
5237568 => __('%d Months', 2),
7856352 => __('%d Months', 3),
10475136 => __('%d Months', 4),
15712704 => __('%d Months', 6),
31536000 => __('%d Year', 1),
63072000 => __('%d Years', 2),
94608000 => __('%d Years', 3),
126144000 => __('%d Years', 4),
157680000 => __('%d Years', 5),
189216000 => __('%d Years', 6),
220752000 => __('%d Years', 7),
252288000 => __('%d Years', 8),
283824000 => __('%d Years', 9),
315360000 => __('%d Years', 10)
);
$daily_timespans = array(
7 => __('%d Week', 1),
14 => __('%d Weeks', 2),
21 => __('%d Weeks', 3),
30 => __('%d Month', 1),
60 => __('%d Months', 2),
90 => __('%d Months', 3),
182 => __('%d Months', 6),
365 => __('%d Year', 1),
);
$weekly_timespans = array(
1 => __('%d Week', 1),
2 => __('%d Weeks', 2),
3 => __('%d Weeks', 3),
4 => __('%d Month', 1),
8 => __('%d Months', 2),
13 => __('%d Months', 3),
17 => __('%d Months', 4),
26 => __('%d Months', 6),
52 => __('%d Year', 1),
104 => __('%d Year', 2),
156 => __('%d Year', 3),
208 => __('%d Year', 4),
);
$monthly_timespans = array(
1 => __('%d Month', 1),
2 => __('%d Months', 2),
3 => __('%d Months', 3),
6 => __('%d Months', 6),
12 => __('%d Year', 1),
24 => __('%d Year', 2),
36 => __('%d Year', 3),
48 => __('%d Year', 4),
);
$yearly_timespans = array(
1 => __('%d Year', 1),
2 => __('%d Years', 2),
3 => __('%d Years', 3),
4 => __('%d Years', 4),
5 => __('%d Years', 5),
6 => __('%d Years', 6),
7 => __('%d Years', 7),
8 => __('%d Years', 8),
9 => __('%d Years', 9),
10 => __('%d Years', 10),
);
$poller_intervals = array(
10 => __('Every %d Seconds', 10),
15 => __('Every %d Seconds', 15),
20 => __('Every %d Seconds', 20),
30 => __('Every %d Seconds', 30),
60 => __('Every Minute'),
300 => __('Every %d Minutes', 5)
);
$poller_sync_intervals = array(
0 => __('Disabled/Manual'),
1800 => __('Every %d Minutes', 30),
3600 => __('Every Hour'),
7200 => __('Every %d Hours', 2),
14400 => __('Every %d Hours', 4),
28800 => __('Every %d Hours', 8),
57600 => __('Every %d Hours', 16),
86400 => __('Every day'),
);
$device_threads = array(
1 => __('1 Thread'),
2 => __('%d Threads', 2),
3 => __('%d Threads', 3),
4 => __('%d Threads', 4),
5 => __('%d Threads', 5),
6 => __('%d Threads', 6),
7 => __('%d Threads', 7),
8 => __('%d Threads', 8),
9 => __('%d Threads', 9),
10 => __('%d Threads', 10)
);
$device_change_fields = array(
'preg_field' => array(
'/^snmp_/',
'/^ping_/'
),
'match_field' => array(
'poller_id',
'site_id',
'host_template_id',
'availability_method',
'device_threads',
'location',
'max_oids'
)
);
$cron_intervals = array(
60 => __('Every Minute'),
300 => __('Every %d Minutes', 5)
);
$registered_cacti_names = array(
'path_cacti'
);
$graph_views = array(1 =>
__('Tree View'),
__('List View'),
__('Preview View')
);
$auth_methods = array(
AUTH_METHOD_CACTI => __('Cacti Builtin Authentication'),
AUTH_METHOD_BASIC => __('Web Basic Authentication')
);
if (function_exists('ldap_connect')) {
$auth_methods[AUTH_METHOD_DOMAIN] = __('LDAP/AD User Domains');
}
$domain_types = array(
DOMAIN_TYPE_LDAP => __('LDAP'),-
DOMAIN_TYPE_AD => __('Active Directory')
);
$auth_realms = get_auth_realms();
$ldap_versions = array(
2 => __('Version %d', 2),
3 => __('Version %d', 3)
);
$ldap_encryption = array(
0 => __('None'),
1 => __('LDAPS'),
2 => __('LDAP + TLS')
);
$ldap_tls_cert_req = array(
LDAP_OPT_X_TLS_NEVER => __('Never'),
LDAP_OPT_X_TLS_HARD => __('Hard'),
LDAP_OPT_X_TLS_DEMAND => __('Demand'),
LDAP_OPT_X_TLS_ALLOW => __('Allow'),
LDAP_OPT_X_TLS_TRY => __('Try')
);
$ldap_modes = array(
0 => __('No Searching'),
1 => __('Anonymous Searching'),
2 => __('Specific Searching')
);
$rrdtool_versions = array(
'1.3.0' => 'RRDtool 1.3+',
'1.4.0' => 'RRDtool 1.4+',
'1.5.0' => 'RRDtool 1.5+',
'1.6.0' => 'RRDtool 1.6+',
'1.7.0' => 'RRDtool 1.7+',
'1.7.1' => 'RRDtool 1.7.1+',
'1.7.2' => 'RRDtool 1.7.2+',
'1.8.0' => 'RRDtool 1.8+'
);
$i18n_modes = array(
0 => __('Disabled'),
1 => __('Enabled'),
2 => __('Enabled (strict mode)'),
);
$cdef_item_types = array(
CVDEF_ITEM_TYPE_FUNCTION => __('Function'),
CVDEF_ITEM_TYPE_OPERATOR => __('Operator'),
CVDEF_ITEM_TYPE_SPEC_DS => __('Special Data Source'),
CVDEF_ITEM_TYPE_CDEF => __('Another CDEF'),
CVDEF_ITEM_TYPE_STRING => __('Custom String')
);
$graph_color_alpha = array(
'00' => ' 0%',
'19' => ' 10%',
'33' => ' 20%',
'4C' => ' 30%',