mactrack_scanner error in CentOS Linux 7.2.1511, Cacti 0.8.8

Support questions about the MAC Track plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
mikecarel
Cacti User
Posts: 68
Joined: Thu Jun 03, 2010 10:00 pm

mactrack_scanner error in CentOS Linux 7.2.1511, Cacti 0.8.8

#1 Post by mikecarel » Mon Apr 25, 2016 4:18 am

Hi to all;

I'm having error with mactrack_scanner that exist only in cacti0.8.8f installation, below are the details of my installations:

CentOS Linux 7.2.1511
Cacti Version 0.8.8f
PHPInfo:
PHP Version 5.4.16
NET-SNMP Support enabled
NET-SNMP Version 5.7.2
PHP SNMP Version 0.1
Cacti SNMP Utility : Net-SNMP 5.x

Errors:

PHP Notice: Undefined index: ipNetToMediaIfIndex.1476.192.168.5.33 in /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line 390
PHP Notice: Undefined index: ipNetToMediaIfIndex.1476.192.168.5.33 in /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line 391
PHP Notice: Undefined index: ipNetToMediaIfIndex.2180.192.168.181.249 in /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line 390
PHP Notice: Undefined index: ipNetToMediaIfIndex.2180.192.168.181.249 in /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line 391
PHP Notice: Undefined index: ipNetToMediaIfIndex.2186.192.168.125.5 in /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line 390
PHP Notice: Undefined index: ipNetToMediaIfIndex.2186.192.168.125.5 in /var/www/html/cacti/plugins/mactrack/lib/mactrack_functions.php on line 391


Manually Querying to simulate:
$atifIndexes = xform_stripped_oid(".1.3.6.1.2.1.4.22.1.1", $device);


[[email protected] lib]# snmpwalk -v 2c -c xxxxxx 192.168.181.xxx .1.3.6.1.2.1.4.22.1.1
IP-MIB::ipNetToMediaIfIndex.1476.192.168.5.33 = INTEGER: 1476
IP-MIB::ipNetToMediaIfIndex.2180.192.168.181.249 = INTEGER: 2180
IP-MIB::ipNetToMediaIfIndex.2186.192.168.125.5 = INTEGER: 2186
IP-MIB::ipNetToMediaIfIndex.2259.172.16.150.54 = INTEGER: 2259
IP-MIB::ipNetToMediaIfIndex.2259.172.16.150.199 = INTEGER: 2259
IP-MIB::ipNetToMediaIfIndex.2259.172.16.150.200 = INTEGER: 2259
IP-MIB::ipNetToMediaIfIndex.2259.172.16.150.224 = INTEGER: 2259
IP-MIB::ipNetToMediaIfIndex.2259.172.16.150.226 = INTEGER: 2259
IP-MIB::ipNetToMediaIfIndex.2259.172.16.150.234 = INTEGER: 2259
IP-MIB::ipNetToMediaIfIndex.2260.172.16.151.2 = INTEGER: 2260
IP-MIB::ipNetToMediaIfIndex.2260.172.16.151.36 = INTEGER: 2260
IP-MIB::ipNetToMediaIfIndex.2260.172.16.151.37 = INTEGER: 2260
IP-MIB::ipNetToMediaIfIndex.2265.192.168.77.132 = INTEGER: 2265
IP-MIB::ipNetToMediaIfIndex.2265.192.168.77.133 = INTEGER: 2265
IP-MIB::ipNetToMediaIfIndex.2265.192.168.77.134 = INTEGER: 2265
IP-MIB::ipNetToMediaIfIndex.2284.10.157.12.197 = INTEGER: 2284
IP-MIB::ipNetToMediaIfIndex.2284.10.157.12.206 = INTEGER: 2284
IP-MIB::ipNetToMediaIfIndex.2285.192.168.171.32 = INTEGER: 2285
IP-MIB::ipNetToMediaIfIndex.2285.192.168.171.33 = INTEGER: 2285
IP-MIB::ipNetToMediaIfIndex.2285.192.168.171.34 = INTEGER: 2285
.........

The problem is pointing to these codes.
/* get the ifNames for the device */
$keys = array_keys($atifIndexes);
$i = 0;
if (sizeof($atifIndexes)) {
foreach($atifIndexes as $atifIndex) {
$atEntries[$i]["atifIndex"] = $atifIndex;
$atEntries[$i]["atPhysAddress"] = $atPhysAddress[$keys[$i]];
$atEntries[$i]["atNetAddress"] = xform_net_address($atNetAddress[$keys[$i]]);
$i++;
}

It seems theres an issue in xform_stripped_oid() function using cacti0.8.8f?

That error did not appear in Cacti Version 0.8.7i Redhat 6.1 with the following PHP installation:
PHP Version 5.3.2
NET-SNMP Support enabled
NET-SNMP Version 5.5
Cacti SNMP Utility : Net-SNMP 5.x


Thank in advance for any helps and replies.

Mike

Post Reply