[FC] MAC Track MOD: VLAN Filter

Support questions about the MAC Track plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

[FC] MAC Track MOD: VLAN Filter

#1 Post by warnesj » Sat Jan 06, 2007 2:24 am

Hi all, love this plugin TheWitness! I made a little mod to it though that I thought I'd share.

With some of my switches (okay, probably all of my switches) I run multiple VLANs on them. Sometime I want information on just a particular VLAN for a site or a switch. MAC Track has all that information so I took a stab a modifying the code to help me filter for a VLAN and display information about it in the viewer table.

I made some changes to mactrack_view.php and html/inc_mactrack_view_site_filter_table.php and I think I have it working now. I've included both of the modified files below in the attached .zip file. In the mactrack_view.php I've tagged most of the changes with "//VLAN changes start" and "//VLAN changes end" so you can see where I made changes (or just look for every instance of "m_vlan_id" which is the session variable I use). I marked the changes in html/inc_mactrack_view_site_filter_table.php with some HTML comments (just look for "VLAN" and it'll take you to the area I added stuff).

Now my display has a VLAN filter drop-down list in it (highlighted in the image below),
Image

And when I choose a VLAN the table updates and filter's the display (as shown below),
Image

One thing that I think I'm going to do is alter the mac_track_ports table to index both the vlan_id and vlan_name rows to help speed up the creation of the drop-down list. But I really HATE modifying database tables just in case the changes I make screw up future usability.

Not sure if anyone else will find this mod useful, but I thought I'd share it anyway.
Attachments
mactrack_vlan_filter_mod.zip
MAC Track VLAN Filter MOD files
(9.39 KiB) Downloaded 366 times

MagicOneXXX
Cacti User
Posts: 59
Joined: Tue Dec 19, 2006 4:35 pm

Appreciated

#2 Post by MagicOneXXX » Mon Jan 08, 2007 10:00 am

Little "mods" like these are always useful :-) Thanks!

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

#3 Post by TheWitness » Thu Jan 11, 2007 8:12 am

This is Done!! in SVN.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

bambid
Posts: 22
Joined: Thu Nov 02, 2006 3:10 am

#4 Post by bambid » Thu Jan 11, 2007 8:58 am

Hi Witness, when will be available new version of MAC Track ?
David

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

#5 Post by TheWitness » Thu Jan 11, 2007 9:40 am

I have 3 major features to write and am taking Device Type exports from users who have extended the interface. However, I am keeping the SVN fully operational for new features.

You can take snapshots. I have and will not touch scanning functions at this point, I am only adding UI feature and new functionality to go along with the existing data, so you should be safe.

However, you MUST be at Cacti 0.8.6i in order to take the SVN version.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

#6 Post by warnesj » Thu Jan 11, 2007 10:09 am

TheWitness wrote:This is Done!! in SVN.

TheWitness
Was this in SVN before my post, if so sorry about that. I don't typically look at the SVN versions. I suppose I should.

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

#7 Post by TheWitness » Thu Jan 11, 2007 10:11 am

Yes.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Re: [FC] MAC Track MOD: VLAN Filter

#8 Post by Vins » Fri Mar 10, 2017 3:30 pm

But still is not available in the stable version of branch 0.8.7x/0.8.8x... :( maybe I'm wrong, but I haven't seen it. :roll:
I've noticed the presence of the mac_track_vlan table and digged into the Cacti forum, finding out this post... funny enough, I hade to write a script by myself in order to retrieve all the vlans from the switchs; I've never wasted that time if I knew that mactrack already had this hidden functionality... :-?

I'm quite sure most of the mactrack users would find it very useful. :wink:

Post Reply