End Device Tracking Add-On for Cacti

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
User avatar
vedd99
Posts: 32
Joined: Wed Jan 11, 2006 4:51 pm
Contact:

Post by vedd99 »

knobdy wrote:OUCH! I updated my installation and, inadvertantly, cleaned out all of my mactrack data (sites, devices, everything).

I have a recent enough cacti dump - full database - to get the devices and sites and device types back... can anyone tell me how to go about that?

Obviously I don't want to overwrite the entire DB, the dump is less than two weeks old but I've made some changes since then in Cacti, in parts other than mactrack.
I did the same thing (on several occasions). Just run the database_upgrade.php file instead of importing the mactrack.sql file when you're doing updates.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Yeah, I knew what I had done the moment I had already done it... SO... how to get the data back is the question.

I've created a new database called back_import and I've imported the dump I had into it. Using phpMyAdmin I'm going to try and copy the data from the dump to the live cacti database. Anyone see difficulty in that?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

One obvious problem is that the tables no longer match - and I'm not sure how, if you can, I can update the backup database tables using the update script.

Guess I'll be rebuilding everything... :oops:
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Okay, for those who might make the same mistake, I got everything back without manually adding them by:

Code: Select all

1. create a new database by some new name
2. importing my last backup (hope you have one) into new database
3. running the commands from database_upgrade against new database
3. exporting the data from the individual tables
4. importing the exported data into the live cacti database
It wasn't quite that quick and easy, or direct, as I was fumbling through it. I'm also using phpMyAdmin which is probably not the most effecient method. Finally, I know nothing about mysql so your mileage may vary - I just know this got me back in business.

Still no DNS or 4000 switches, but I'm patient. :)
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

First, use mysqladmin or mysql query browser to delete the mac_track tables. Then, edit the dump file and remove everything but the table definitions starting with "mac_track". Then issue the following command:

mysql -u root -p cacti < myedited_file.sql

That command will only then restore the mac_track tables.

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?
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Hey knobdy............ what kind of 4000 switches dont you have working?? Cisco Catalysts?? I have some 4006's here , well i've added 1 so far and it works fine. I havent messed with Reverse DNS yet but I have 2 devices added to my site now. Cisco 4006 and 6509 , the 6509 catalyst serves as our core router.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

spoonman wrote:Hey knobdy............ what kind of 4000 switches dont you have working?? Cisco Catalysts?? I have some 4006's here , well i've added 1 so far and it works fine.
We have two 4006s. I can get IPs from the one powered blade on the one 4006 - but nothing else.

Mind sharing more info on your setup? Feel free to PM me as well!
fin51
Posts: 6
Joined: Fri Nov 18, 2005 8:12 am

Post by fin51 »

sobacha wrote:fin51,

Thank you for your information. Unfortunately, there are some vlans :)
Now, I can't get the dot1qTpFdbAddress from my E300(FTOS6.2.1.3).
So, what about in your case? Which OID includes the dot1q mac table?

There seems to be no mac address information in the response for qBridgeMIB(1.3.6.1.2.1.17.7.***) query, in my environment.

-----------------
Q-BRIDGE-MIB::dot1qVlanVersionNumber.0 = INTEGER: version1(1)
Q-BRIDGE-MIB::dot1qMaxVlanId.0 = INTEGER: 4094
Q-BRIDGE-MIB::dot1qMaxSupportedVlans.0 = Gauge32: 4094
Q-BRIDGE-MIB::dot1qNumVlans.0 = Gauge32: 6
Q-BRIDGE-MIB::dot1qGvrpStatus.0 = INTEGER: enabled(1)
Q-BRIDGE-MIB::dot1qFdbDynamicCount.1 = Counter32: 0
Q-BRIDGE-MIB::dot1qFdbDynamicCount.20 = Counter32: 105
Q-BRIDGE-MIB::dot1qFdbDynamicCount.21 = Counter32: 34
Q-BRIDGE-MIB::dot1qFdbDynamicCount.22 = Counter32: 0
Q-BRIDGE-MIB::dot1qFdbDynamicCount.31 = Counter32: 0
Q-BRIDGE-MIB::dot1qFdbDynamicCount.255 = Counter32: 10
Q-BRIDGE-MIB::dot1qTpFdbPort.20.'...-..' = INTEGER: 1
Q-BRIDGE-MIB::dot1qTpFdbPort.20.'....y.' = INTEGER: 1
Q-BRIDGE-MIB::dot1qTpFdbPort.20.'......' = INTEGER: 18
:
:
-----------------

TIA
soba
Soba,

Well the way I did this was kind of different. I have a script that logs into my
E600 via ssh and runs "show mac-address table | except Po" and puts the output to a file on my server.. This gives me macs to ports without my trunkports. Then I get the arp table from the router and have some scripts on the server that match up the macs with ips from the arp table on the router and output it to a file. Next a script takes the ip, macs and ports and makes insert statements for the mac_track databases and inserts them. Next I copied the resolver.php script to resolver1.php and changed the table that it looks in mactrack_temp_ports to mactrack_ports so that it resolves all the ips for the stuff we just inserted into the database. Well that's about it but it works perfectly. It's a work around and would not suggest it for a bunch of switches.
tommyj
Posts: 43
Joined: Thu Jun 23, 2005 5:16 pm
Location: Stockholm, Sweden

Post by tommyj »

Three sugestions/requests if possible:

1. Would it be possible to specify a DNS for each site instead as now globally?

2. It would be nice if you could sort the entries by port number, vlan and so on, e.g make the header entries clickable. Of course you can do this by doing an export but it would be nice to do it in the webinterface as well.

3. If a port is not active, see how many days it's been idle. This because if all of the ports on the switch are connected and you need to add another connection you can remove some of the -probably- unused cables.
sobacha
Posts: 7
Joined: Fri Jan 13, 2006 12:56 am

Post by sobacha »

TheWitness wrote: I had the same issue while scanning Cisco 1200 AP's. Everything else was as it should have been, but the MAC address MIB was not populated.
Thanks.
I will contact my reseller.

Regards,
soba
sobacha
Posts: 7
Joined: Fri Jan 13, 2006 12:56 am

Post by sobacha »

fin51 wrote: Well the way I did this was kind of different.
Oh, I see.
I've already have scripts like yours. Thank you for a nice idea!
I'll try.

Regards,
soba
mforrest
Posts: 2
Joined: Sat Oct 29, 2005 2:20 pm

Post by mforrest »

Has anyone got HP ProCurve support fully working for anything other than the HP 4000 series? In particular am interested in pulling off port info for 4108's, 2600 and 2800 series switches. The procurve option doesnt work for anything other than the 4000 and the generic switch one doesnt convert the port numbers into the proper style etc. Would be nice to get it working fully and may just have to put time into making it work.

Another thing....I have about 600 IP's in the database, although the site-ip option has never worked for me. It just shows no info :-( Anyone got any ideas on why it doesnt work?

Finally, anyone got this working with foundry routers (BigIron's/FastIron's etc)?

Cheers
ceyounger
Posts: 44
Joined: Fri Feb 10, 2006 2:59 pm
Location: Orange County, CA
Contact:

Post by ceyounger »

I really want to get this working...I can taste it!

After much hair-pulling and gnashing of teeth I can input device types, sites, and devices.

But the poller runs once or twice then never runs again--I have to run it manually. I've got DB errors everytime I do run the poller:

02/10/2006 08:33:53 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE `mac_track_ip_ranges` SET ips_max=ips_current, ips_max_date=ips_current_date WHERE ips_current > ips_max"

And finally, nothing shows up on the MAC Track tab itself no matter what filter I run. Ports shows up in the console selections though.

Any suggestions for what to do?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

TheWitness wrote:Soba,

I had the same issue while scanning Cisco 1200 AP's. Everything else was as it should have been, but the MAC address MIB was not populated.
Have you figured this out? Soba, did a call get it fixed?

We're running 2 1100s, 2 1200s and an older/smaller AP - none of which return data.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Sorry for delay on the 4006's knobody. Will post my setup today .....
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests