[FIXED] Missing Vendor Name(s) after IP Address Discovered

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
Leddy
Cacti User
Posts: 93
Joined: Sun May 15, 2005 6:55 pm

[FIXED] Missing Vendor Name(s) after IP Address Discovered

Post by Leddy »

Is this a bug, or by design? I like knowing the Vendor Names. However once I resolved an issue with no IP's those devices that it was able to ascertain the IP of aren't showing their Vendor names anymore.

I'm assuming not all IP addresses are shown because of arp cache clearing and no activity before running the poller. Feel free to correct me if I'm wrong :)
Attachments
mactrack.JPG
mactrack.JPG (78.16 KiB) Viewed 8159 times
m10
Posts: 7
Joined: Wed Feb 15, 2006 6:19 am
Location: HK, China

Post by m10 »

I got the same problem with you.
I think this is a bug in the mactrack_resolver.php at line 145. Should fix by replace the follow insert_string.

Code: Select all

$insert_string = "REPLACE INTO mac_track_temp_ports " .
				"(site_id,device_id,hostname,dns_hostname,device_name,vlan_id,vlan_name," .
				"mac_address,vendor_mac,ip_address,port_number,port_name,scan_date)" .
				" VALUES ('" .
				$unresolved_ip["site_id"] . "','" .
				$unresolved_ip["device_id"] . "','" .
				$unresolved_ip["hostname"] . "','" .
				$unresolved_ip["dns_hostname"] . "','" .
				$unresolved_ip["device_name"] . "','" .
				$unresolved_ip["vlan_id"] . "','" .
				$unresolved_ip["vlan_name"] . "','" .
				$unresolved_ip["mac_address"] . "','" .
				$unresolved_ip["vendor_mac"] . "','" .
				$unresolved_ip["ip_address"] . "','" .
				$unresolved_ip["port_number"] . "','" .
				$unresolved_ip["port_name"] . "','" .
				$unresolved_ip["scan_date"] . "')";
tommyj
Posts: 43
Joined: Thu Jun 23, 2005 5:16 pm
Location: Stockholm, Sweden

Post by tommyj »

Thanks for this, had the same issue myself and adding the row

Code: Select all

           $unresolved_ip["vendor_mac"] . "','" . 
to mactrack_resolver.php resolved for me
tommyj
Posts: 43
Joined: Thu Jun 23, 2005 5:16 pm
Location: Stockholm, Sweden

Post by tommyj »

Update: It seems that if I add the row mentioned above I do get the vendor field but it seems that the resolver function stops working, I.E no hostnames will be resolved, I only get the IP address. Removing the vendor row the reslover function starts working again.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Here's the fix for this problem.

Apparently the SUBSTRING command which is supposed to work in MySQL apparently doesn't. But SUBSTR does.

Change the following line in poller_mactrack.php, clear your MacTrack data and let it start polling again. You'll see that the vendor_mac field in mactrack_ports gets populated correctly, which it wasn't before.
Attachments
SP32-20080812-151731.gif
SP32-20080812-151731.gif (3.37 KiB) Viewed 6882 times
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
janchan88
Posts: 15
Joined: Tue Nov 03, 2009 6:50 pm

Post by janchan88 »

I ran into the exact same problem but changing SUBSTRING to SUBSTR did not work for me, any idea?
Cacti Version - 0.8.7c
Plugin Architecture - 2.2
Poller Type - Cactid v
Server Info - Linux 2.6.9-89.0.15.plus.c4
Web Server - Apache/2.0.63 (CentOS)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, gd, ldap, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp, eAccelerator
MySQL - 5.0.82sp1
RRDTool - 1.2.23
SNMP - 5.1.2
Plugins
  • Global Plugin Settings (settings - v0.5)
    Large Site Performane Booster (boost - v2.4)
    Device Monitoring (monitor - v0.8.2)
    Network Discovery (discovery - v0.9)
    Network Tools (tools - v0.3)
    Syslog Monitoring (syslog - v0.5.2)
    Device Tracking (mactrack - v2.1)
    Login Page Mod (loginmod - v1.0)
    Update Checker (update - v0.4)
    FlowView (flowview - v0.6)
    Host Info (hostinfo - v0.2)
    Error Images (errorimage - v0.1)
    PHP Network Weathermap (weathermap - v0.96a)
    docs
    Cacti-ReportIt (reportit - v0.6.1)
    SSL Redirector (ssl - v0.1)
    Router Configs (routerconfigs - v0.1)
    wmi
    Realtime for Cacti (realtime - v0.35)
janchan88
Posts: 15
Joined: Tue Nov 03, 2009 6:50 pm

Post by janchan88 »

Never mind, I figured it out. There was a bug in mactrack_resolver.php file. Just modify the file as below:
Attachments
mactrack_resolver.jpg
mactrack_resolver.jpg (111.75 KiB) Viewed 4907 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Fixed in SVN.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest