End Device Tracking Add-On for Cacti

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
Dwayne_Dibbley
Cacti User
Posts: 52
Joined: Sun Sep 18, 2005 3:38 pm

Post by Dwayne_Dibbley »

I have a site with 6 Cat 5500 and 2 3600 routers that i have added, The MACTRACK tab shows results from these devices, bu looking in the cacti.log its reporting CMDPHP Poller ERROR SQL Exec Failed "INSERT INTO mac_track_ips (site_id,devide_id,hostname,description,port_number,mac_address,ip_address,scan_data) VALUES ('2','3','172.16.4.98','PL3540BT','9','NOT USER','10.9.1.1','2006-01-04 13:00:06')"

the device 172.16.4.98 is the router should this not be the catalist?

I am using the 1b plugin with the final release version h of cacti with plugin arch for h

Thanks
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Dwayne,

In the two functions in lib/mactrack/mactrack_functions.php

get_arp_ip_ranges and
db_store_device_port_results

Change "INSERT INTO" to "REPLACE INTO".

I discovered this myself this morning.

Larry
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?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I have also found a few more issues that will affect Cisco switches. They are corner cases and will be patched today.

Larry
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?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

TheWitness wrote:I have also found a few more issues that will affect Cisco switches. They are corner cases and will be patched today.
Any of them cover the 4006?

I'm still having the issue where mactrack is only picking up addresses from 1 blade of a 4006 switch. I have compared the configurations of that switch and its twin on another floor and there are no significant difference. I've compared the configurations for the 5 switch blades and found no differences. Is there anything I should be looking for, specifically, that might be causing mactrack to fail?

Also, is there a way to clear out all of the data thus far collected to start "fresh" (not devices, just mac addresses)? Just do it through mysql?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You are using snmpv1 for the 4006 right? It has issues with snmpv2. For now, simply "truncate table mac_track_ports". I have to add that feature.
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?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

TheWitness wrote:You are using snmpv1 for the 4006 right? It has issues with snmpv2.
I hadn't, but do now. :) I was going to try that before making this post but since I have two, and the one was working, I didn't think that should be an issue. However the two switches are at different code levels and perhaps that's the difference.

What cisco code versions have you seen problems with SNMPv2? Which have been okay, if any? (anyone else have a 4006 with which they might provide feedback)

{UPDATE}
version 1 didn't help, still get the one blade - ?? Very strange - open to any suggestions!
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

knobby, can I remotely access the device? Can you push me a dump of the entire MIB? I would need it two ways, with and without numeric OID's.

TheWitness
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?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Uhmm..it would be difficult to impossible to give you access - but I can try and provide you - privately - what you need to help. This tool will be VERY helpful to us and if we can help in its development we'll be willing to do what ever we can within company policies to do so. :)

What do I need to do, specifically, and where do I send it?

Guessing an snmpwalk to text file with a couple of different options?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

I've got a severe problem now. I went ahead and upgraded to h and the updated plugin architecture - which destroyed this (mac_track) plugin. Fonts and graphics are all wrong. Is there an easy fix?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Here are the files. There are some more updates to be made. This will get you back in business though.

http://svn.cacti.net/cgi-bin/viewcvs.cg ... t=MacTrack

Once you have copied all the files, you need to change directories to:

"<cacti_webroot>/lib/mactrack"

Then run:

"php database_upgrade.php"

You will then be back in business. Oh, when you do, your device types table will have to be populated in order for scanning to work.

TheWitness
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?
Dwayne_Dibbley
Cacti User
Posts: 52
Joined: Sun Sep 18, 2005 3:38 pm

Post by Dwayne_Dibbley »

TheWitness wrote:Here are the files. There are some more updates to be made. This will get you back in business though.

http://svn.cacti.net/cgi-bin/viewcvs.cg ... t=MacTrack

Once you have copied all the files, you need to change directories to:

"<cacti_webroot>/lib/mactrack"

Then run:

"php database_upgrade.php"

You will then be back in business. Oh, when you do, your device types table will have to be populated in order for scanning to work.

TheWitness
I still get theses errors with your latest:

CMDPHP Poller ERROR SQL Exec Failed "INSERT INTO mac_track_ips (site_id,devide_id,hostname,description,port_number,mac_address,ip_address,scan_data) VALUES ('2','3','172.16.4.98','PL3540BT','9','NOT USER','10.9.1.1','2006-01-04 13:00:06')"

Do i need to still change INSERT with REPLACE as per above ?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yes, if you look at that SVN page, there is a "plugin" and a "native" version of the code. Cigamit is a day behind right now. However, I'm not too sure about the "magic" he performs to migrate to the "plugin" architecture. So, I would simply change the "INSERT INTO" to "REPLACE INTO" as noted above and you should be Ok.

I do have a few features that I forgot about that I need to make to the code. However, I am tracking database changes in the "database_upgrade.php" file, so you should be ok.

Let me know how you like the new UI...

TheWitness
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?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

How do I get all of the code - easily? I can't do a check out so...?
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

TheWitness wrote:Yes, if you look at that SVN page, there is a "plugin" and a "native" version of the code. Cigamit is a day behind right now. However, I'm not too sure about the "magic" he performs to migrate to the "plugin" architecture. So, I would simply change the "INSERT INTO" to "REPLACE INTO" as noted above and you should be Ok.

I do have a few features that I forgot about that I need to make to the code. However, I am tracking database changes in the "database_upgrade.php" file, so you should be ok.

Let me know how you like the new UI...

TheWitness
It was the wife's BD yesterday, so had to take her out for a night on the town, so no computer for me. I should be able to get it caught up tonight.
Dwayne_Dibbley
Cacti User
Posts: 52
Joined: Sun Sep 18, 2005 3:38 pm

Post by Dwayne_Dibbley »

I have replaced the INSERT with REPLACE in the plugin version no more errors.

On the MACTRACK tab i now see End Device IP etc no problems.

When on Sites under the Device Tracking Menu, Site Name is displayed with Number of devices and Total IP's but User Ports User Ports Up MACS Found are all 0?

Same goes for the Devices under the Device tracking Menu.

Nothing else to report as yet

Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests