Closed blackjimg closed 1 year ago
you need to grab the develop version from here..
你需要从这里获取开发版本..
reinstall version
UI prompt /cacti/plugins/mactrack/mactrackview.php was not found on this server.
You should have some errors in your Cacti log when this happens. Post those error messages.
create the missing table using this SQL command:
CREATE TABLE `mac_track_aggregated_ports` (
`row_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`site_id` int(10) unsigned NOT NULL DEFAULT 0,
`device_id` int(10) unsigned NOT NULL DEFAULT 0,
`hostname` varchar(40) NOT NULL DEFAULT '',
`device_name` varchar(100) NOT NULL DEFAULT '',
`vlan_id` varchar(5) NOT NULL DEFAULT 'N/A',
`vlan_name` varchar(50) NOT NULL DEFAULT '',
`mac_address` varchar(20) NOT NULL DEFAULT '',
`vendor_mac` varchar(8) DEFAULT NULL,
`ip_address` varchar(20) NOT NULL DEFAULT '',
`dns_hostname` varchar(200) DEFAULT NULL,
`port_number` varchar(20) NOT NULL DEFAULT '',
`port_name` varchar(50) NOT NULL DEFAULT '',
`date_last` timestamp NOT NULL DEFAULT current_timestamp(),
`first_scan_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`count_rec` int(10) unsigned NOT NULL DEFAULT 0,
`active_last` tinyint(1) unsigned NOT NULL DEFAULT 0,
`authorized` tinyint(3) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`row_id`),
KEY `port_number` (`port_number`,`mac_address`,`ip_address`,`device_id`,`site_id`,`vlan_id`,`authorized`),
KEY `site_id` (`site_id`),
KEY `device_name` (`device_name`),
KEY `mac` (`mac_address`),
KEY `hostname` (`hostname`),
KEY `vlan_name` (`vlan_name`),
KEY `vlan_id` (`vlan_id`),
KEY `device_id` (`device_id`),
KEY `ip_address` (`ip_address`),
KEY `port_name` (`port_name`),
KEY `dns_hostname` (`dns_hostname`),
KEY `vendor_mac` (`vendor_mac`),
KEY `authorized` (`authorized`),
KEY `site_id_device_id` (`site_id`,`device_id`)
) ENGINE=InnoDB COMMENT='Database for aggregated date for Tracking Device MACs';
2022-05-25 09:35:03 - CMDPHP SQL Backtrace: (/plugins/mactrack/poller_mactrack.php[239]:perform_mactrack_db_maint(), /plugins/mactrack/lib/mactrack_functions.php[2381]:db_execute(), /lib/database.php[272]:db_execute_prepared()) -- 2022-05-25 09:35:03 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti.mac_track_ports' doesn't exist 2022-05-25 09:35:03 - CMDPHP SQL Backtrace: (/plugins/mactrack/poller_mactrack.php[239]:perform_mactrack_db_maint(), /plugins/mactrack/lib/mactrack_functions.php[2378]:db_execute(), /lib/database.php[272]:db_execute_prepared()) 2022-05-25 09:35:03 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti.mac_track_ports' doesn't exist 2022-05-25 09:35:03 - CMDPHP SQL Backtrace: (/plugins/mactrack/poller_mactrack.php[239]:perform_mactrack_db_maint(), /plugins/mactrack/lib/mactrack_functions.php[2322]:db_execute_prepared()) 2022-05-25 09:35:03 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti.mac_track_ports' doesn't exist 2022-05-25 09:35:03 - CMDPHP SQL Backtrace: (/plugins/mactrack/poller_mactrack.php[239]:perform_mactrack_db_maint(), /plugins/mactrack/lib/mactrack_functions.php[2312]:db_fetch_row(), /lib/database.php[532]:db_fetch_row_prepared(), /lib/database.php[552]:db_execute_prepared()) 2022-05-25 09:35:03 - CMDPHP ERROR: A DB Row Failed!, Error: Table 'cacti.mac_track_ports' doesn't exist
使用以下 SQL 命令创建缺失的表:
CREATE TABLE `mac_track_aggregated_ports` ( `row_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `site_id` int(10) unsigned NOT NULL DEFAULT 0, `device_id` int(10) unsigned NOT NULL DEFAULT 0, `hostname` varchar(40) NOT NULL DEFAULT '', `device_name` varchar(100) NOT NULL DEFAULT '', `vlan_id` varchar(5) NOT NULL DEFAULT 'N/A', `vlan_name` varchar(50) NOT NULL DEFAULT '', `mac_address` varchar(20) NOT NULL DEFAULT '', `vendor_mac` varchar(8) DEFAULT NULL, `ip_address` varchar(20) NOT NULL DEFAULT '', `dns_hostname` varchar(200) DEFAULT NULL, `port_number` varchar(20) NOT NULL DEFAULT '', `port_name` varchar(50) NOT NULL DEFAULT '', `date_last` timestamp NOT NULL DEFAULT current_timestamp(), `first_scan_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `count_rec` int(10) unsigned NOT NULL DEFAULT 0, `active_last` tinyint(1) unsigned NOT NULL DEFAULT 0, `authorized` tinyint(3) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`row_id`), KEY `port_number` (`port_number`,`mac_address`,`ip_address`,`device_id`,`site_id`,`vlan_id`,`authorized`), KEY `site_id` (`site_id`), KEY `device_name` (`device_name`), KEY `mac` (`mac_address`), KEY `hostname` (`hostname`), KEY `vlan_name` (`vlan_name`), KEY `vlan_id` (`vlan_id`), KEY `device_id` (`device_id`), KEY `ip_address` (`ip_address`), KEY `port_name` (`port_name`), KEY `dns_hostname` (`dns_hostname`), KEY `vendor_mac` (`vendor_mac`), KEY `authorized` (`authorized`), KEY `site_id_device_id` (`site_id`,`device_id`) ) ENGINE=InnoDB COMMENT='Database for aggregated date for Tracking Device MACs';
Query OK, 0 rows affected, 1 warning (0.01 sec) Sorry to reply you so long, the database is executed. But the UI still prompts The requested URL /cacti/plugins/mactrack/mactrackview.php was not found on this server.
No feedback.
cacti:1.2.20 mactrack:4.2
2022-05-17 17:10:14 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[890]:sizeof(), CactiErrorHandler()) -- 2022-05-17 17:10:14 - ERROR PHP WARNING in Plugin 'mactrack': sizeof(): Parameter must be an array or an object that implements Countable in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 890 2022-05-17 17:10:14 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[844]:CactiErrorHandler()) 2022-05-17 17:10:14 - ERROR PHP WARNING in Plugin 'mactrack': Invalid argument supplied for foreach() in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 844 2022-05-17 17:10:14 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[843]:sizeof(), CactiErrorHandler()) 2022-05-17 17:10:14 - ERROR PHP WARNING in Plugin 'mactrack': sizeof(): Parameter must be an array or an object that implements Countable in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 843 2022-05-17 17:10:14 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[791]:db_fetch_cell(), /lib/database.php[462]:db_fetch_cell_prepared(), /lib/database.php[484]:db_execute_prepared()) 2022-05-17 17:10:14 - CMDPHP ERROR: A DB Cell Failed!, Error: Table 'cacti.mac_track_aggregated_ports' doesn't exist 2022-05-17 17:10:14 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[776]:mactrack_view_get_mac_records(), /plugins/mactrack/mactrack_view_macs.php[603]:db_fetch_assoc(), /lib/database.php[593]:db_fetch_assoc_prepared(), /lib/database.php[613]:db_execute_prepared()) 2022-05-17 17:10:14 - CMDPHP ERROR: A DB Row Failed!, Error: Table 'cacti.mac_track_aggregated_ports' doesn't exist 2022-05-17 17:10:12 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[890]:sizeof(), CactiErrorHandler()) 2022-05-17 17:10:12 - ERROR PHP WARNING in Plugin 'mactrack': sizeof(): Parameter must be an array or an object that implements Countable in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 890 2022-05-17 17:10:12 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[844]:CactiErrorHandler()) 2022-05-17 17:10:12 - ERROR PHP WARNING in Plugin 'mactrack': Invalid argument supplied for foreach() in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 844 2022-05-17 17:10:12 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[843]:sizeof(), CactiErrorHandler()) 2022-05-17 17:10:12 - ERROR PHP WARNING in Plugin 'mactrack': sizeof(): Parameter must be an array or an object that implements Countable in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 843 2022-05-17 17:10:12 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[791]:db_fetch_cell(), /lib/database.php[462]:db_fetch_cell_prepared(), /lib/database.php[484]:db_execute_prepared()) 2022-05-17 17:10:12 - CMDPHP ERROR: A DB Cell Failed!, Error: Table 'cacti.mac_track_aggregated_ports' doesn't exist 2022-05-17 17:10:12 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[776]:mactrack_view_get_mac_records(), /plugins/mactrack/mactrack_view_macs.php[603]:db_fetch_assoc(), /lib/database.php[593]:db_fetch_assoc_prepared(), /lib/database.php[613]:db_execute_prepared()) 2022-05-17 17:10:12 - CMDPHP ERROR: A DB Row Failed!, Error: Table 'cacti.mac_track_aggregated_ports' doesn't exist 2022-05-17 17:10:05 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[890]:sizeof(), CactiErrorHandler()) 2022-05-17 17:10:05 - ERROR PHP WARNING in Plugin 'mactrack': sizeof(): Parameter must be an array or an object that implements Countable in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 890 2022-05-17 17:10:05 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[844]:CactiErrorHandler()) 2022-05-17 17:10:05 - ERROR PHP WARNING in Plugin 'mactrack': Invalid argument supplied for foreach() in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 844 2022-05-17 17:10:05 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[843]:sizeof(), CactiErrorHandler()) 2022-05-17 17:10:05 - ERROR PHP WARNING in Plugin 'mactrack': sizeof(): Parameter must be an array or an object that implements Countable in file: /var/www/html/cacti/plugins/mactrack/mactrack_view_macs.php on line: 843 2022-05-17 17:10:05 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[791]:db_fetch_cell(), /lib/database.php[462]:db_fetch_cell_prepared(), /lib/database.php[484]:db_execute_prepared()) 2022-05-17 17:10:05 - CMDPHP ERROR: A DB Cell Failed!, Error: Table 'cacti.mac_track_aggregated_ports' doesn't exist 2022-05-17 17:10:05 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_view_macs.php[63]:mactrack_view_aggregated_macs(), /plugins/mactrack/mactrack_view_macs.php[776]:mactrack_view_get_mac_records(), /plugins/mactrack/mactrack_view_macs.php[603]:db_fetch_assoc(), /lib/database.php[593]:db_fetch_assoc_prepared(), /lib/database.php[613]:db_execute_prepared()) 2022-05-17 17:10:05 - CMDPHP ERROR: A DB Row Failed!, Error: Table 'cacti.mac_track_aggregated_ports' doesn't exist