Cacti 1.1.2 Mactrack 4.0 - Show Site

Support questions about the MAC Track plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Cramin
Posts: 22
Joined: Mon Mar 06, 2017 4:06 pm
Contact:

Cacti 1.1.2 Mactrack 4.0 - Show Site

#1 Post by Cramin » Wed Apr 05, 2017 3:34 am

Image
When i select Site in Mactrack - Interfaces i get no results and in log shows:

Code: Select all

2017-04-05 10:29:00 - DBCALL ERROR: SQL Assoc Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY device_name ASC LIMIT 0, 30' at line 1
2017-04-05 10:29:00 - DBCALL ERROR: SQL Assoc Failed!, Error:1064, SQL:"SELECT mac_track_interfaces.*, mac_track_device_types.description AS device_type, mac_track_devices.device_name, mac_track_devices.host_id, mac_track_devices.disabled, mac_track_devices.last_rundate FROM mac_track_interfaces INNER JOIN mac_track_devices ON mac_track_interfaces.device_id=mac_track_devices.device_id INNER JOIN mac_track_device_types ON mac_track_device_types.device_type_id=mac_track_devices.device_type_id WHERE (mac_track_interfaces.site_id=1 ORDER BY device_name ASC LIMIT 0, 30"
2017-04-05 10:28:56 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/mactrack/mactrack_view_interfaces.php: 38 mactrack_view)(/plugins/mactrack/mactrack_view_interfaces.php: 305 CactiErrorHandler)(/lib/functions.php: 4295 cacti_debug_backtrace) 
...
mactrack_view_interfaces.php

Code: Select all

        if (sizeof($stats)) {
                foreach ($stats as $stat) {
                        /* find the background color and enclose it */
                        $class = mactrack_int_row_class($stat);

                        if ($bgc) {
                                print "<tr id='row_" . $stat['device_id'] . '_' . $stat['ifName'] . "' class='$class'>\n"; $i++;
                        }else{
                                if (($i % 2) == 1) {
                                        $class = 'odd';
                                }else{
                                        $class = 'even';
                                }

                                print "<tr id='row_" . $stat['device_id'] . "' class='$class'>\n"; $i++;
                        }

                        print mactrack_format_interface_row($stat);
                }
        }else{
                print '<tr><td colspan="7"><em>' . __('No MacTrack Interfaces Found') . '</em></td></tr>';
        }

        html_end_box(false);

User avatar
Osiris
Cacti Pro User
Posts: 835
Joined: Mon Jan 05, 2015 10:10 am

Re: Cacti 1.1.2 Mactrack 4.0 - Show Site

#2 Post by Osiris » Wed May 10, 2017 4:20 am

Log that in github.
Before history, there was a paradise, now dust.

Post Reply