Closed DaveNet4300 closed 2 months ago
Line of code based on the error message. Forgot to include in original issue. mactrack_debug("Vlan assembly complete.");
if (sizeof($active_vlans) > 0) {
$i = 0;
/* get the port status information */
//$port_results = get_base_dot1dTpFdbEntry_ports($site, $device, $ifInterfaces, "", "", FALSE);
$mac_results = xform_stripped_oid ( ".1.3.6.1.2.1.17.7.1.2.2.1.2", $device );
$port_results = xform_stripped_oid ( ".1.3.6.1.2.1.17.1.4.1.2", $device );
$i = 0;
$j = 0;
$port_array = array();
foreach($mac_results as $num => $mac_result) {
if ( $mac_result != 0 ) {
$Xvlanid = substr ( $num, 0, strpos ( $num, "." ) );
$Xmac = mach ( substr ( $num, strpos ( $num, ".") + 1 ) );
$ifIndex = $port_results[$mac_result]; -->Line 98
$ifType = $ifInterfaces[$ifIndex]["ifType"]; ---> Line 99
$ifName = $ifInterfaces[$ifIndex]["ifName"]; ---> Line 100
$portName = $ifName;
$portTrunkStatus = @$ifInterfaces[$ifIndex]["trunkPortState"];
Can you create a pull request for this change please?
I think it is fixed via #206
Describe the bug A clear and concise description of what the bug is. MAC addresses are not populating for Juniper EX switch using get_JEX_switch_Ports may be due to this errors loged.
To Reproduce Steps to reproduce the behavior:
CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/mactrack/mactrack_scanner.php[168]:get_JEX_switch_ports(), /plugins/mactrack/lib/mactrack_juniper.php[100]:CactiErrorHandler()) ERROR PHP NOTICE in Plugin 'mactrack': Undefined index: in file: /usr/share/cacti/plugins/mactrack/lib/mactrack_juniper.php on line: 100 CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/mactrack/mactrack_scanner.php[168]:get_JEX_switch_ports(), /plugins/mactrack/lib/mactrack_juniper.php[99]:CactiErrorHandler()) ERROR PHP NOTICE in Plugin 'mactrack': Undefined index: in file: /usr/share/cacti/plugins/mactrack/lib/mactrack_juniper.php on line: 99 CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/mactrack/mactrack_scanner.php[168]:get_JEX_switch_ports(), /plugins/mactrack/lib/mactrack_juniper.php[98]:CactiErrorHandler()) ERROR PHP NOTICE in Plugin 'mactrack': Undefined offset: 591 in file: /usr/share/cacti/plugins/mactrack/lib/mactrack_juniper.php on line: 98 CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/mactrack/mactrack_scanner.php[168]:get_JEX_switch_ports(), /plugins/mactrack/lib/mactrack_juniper.php[100]:CactiErrorHandler()) ERROR PHP NOTICE in Plugin 'mactrack': Undefined index: in file: /usr/share/cacti/plugins/mactrack/lib/mactrack_juniper.php on line: 100
Expected behavior A clear and concise description of what you expected to happen. Mac addresses populated in tab DeviceTracking->Devices or DeviceTracking->MAC address Screenshots If applicable, add screenshots to help explain your problem.
![image](https://user-images.githubusercontent.com/77458476/104637891-66bfb680-5673-11eb-8784-078e78c8e5b6.png)
Plugin (please complete the following information):
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here. Thank you