Mactrack missing tabs.

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Mactrack missing tabs.

Post by Atreides »

It seems to me that I'm missing some tabs from Mactrack, did I miss to install/check a box or anything? I search most of the pictures with Mactrak from here and all have under the Mactrak tab, other tabs like : Sites , Devices, Ip addresses, IP ranges, MAC Addresses, Interfaces, Graph.
I'm missing all of the above, any hints? I have installed latest cacti + pa 2.8 and also latest mactrack plugin(mactrack.sql and sql.0.0.1 imported also).
I can add a site and a device, but I dont see any mac addresses.
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Mactrack missing tabs.

Post by Atreides »

I've noticed that with the last version of mactrak the import of mactrack.sql shouldnt be done anymore. It tells me to use plugin management WebUI to upgrade, but I dont see that option. Where to look?.
inoujk
Posts: 6
Joined: Wed Sep 18, 2013 10:24 am

Re: Mactrack missing tabs.

Post by inoujk »

As a temporary solution, you can remove the user's control to always show this tab :
edit file :
cacti-0.8.8a/plugins/mactrack/setup.php

replace :

Code: Select all

function mactrack_show_tab () {
	global $config, $user_auth_realm_filenames;

	$realm_id = 2120;
	if ((db_fetch_assoc("select user_auth_realm.realm_id
		from user_auth_realm where user_auth_realm.user_id='" . $_SESSION["sess_user_id"] . "'
		and user_auth_realm.realm_id='$realm_id'")) || (empty($realm_id))) {

		if (substr_count($_SERVER["REQUEST_URI"], "mactrack_view_")) {
			print '<a href="' . $config['url_path'] . 'plugins/mactrack/mactrack_view_macs.php"><img src="' . $config['url_path'] . 'plugins/mactrack/images/tab_mactrack_down.png" alt="MacTrack" align="absmiddle" border="0"></a>';
		}else{
			print '<a href="' . $config['url_path'] . 'plugins/mactrack/mactrack_view_macs.php"><img src="' . $config['url_path'] . 'plugins/mactrack/images/tab_mactrack.png" alt="MacTrack" align="absmiddle" border="0"></a>';
		}
	}
}
by :

Code: Select all

function mactrack_show_tab () {
	global $config, $user_auth_realm_filenames;

	$realm_id = 2120;

		if (substr_count($_SERVER["REQUEST_URI"], "mactrack_view_")) {
			print '<a href="' . $config['url_path'] . 'plugins/mactrack/mactrack_view_macs.php"><img src="' . $config['url_path'] . 'plugins/mactrack/images/tab_mactrack_down.png" alt="MacTrack" align="absmiddle" border="0"></a>';
		}else{
			print '<a href="' . $config['url_path'] . 'plugins/mactrack/mactrack_view_macs.php"><img src="' . $config['url_path'] . 'plugins/mactrack/images/tab_mactrack.png" alt="MacTrack" align="absmiddle" border="0"></a>';
		}
}
(or delete the query to check username)
save, refresh you web browser on cacti and the tab will appears

(i take if someone has better..)
tbilan
Posts: 15
Joined: Fri Sep 14, 2012 6:57 pm

Re: Mactrack missing tabs.

Post by tbilan »

Instead of modifying the PHP code I decided to just edit the SQL data:

Code: Select all

insert into user_auth_realm value ('2120', 3);
This told cacti to show the tab for the guest user (user ID #3).

You can get user IDs by querying the user_uath table:

Code: Select all

select * from user_auth;
I also had to click the MacTrack Viewer checkbox for the guest user. I'm sure that updated a table somewhere too but that worked easy enough so I didn't bother tracking the SQL entry down.
sajjad321
Posts: 1
Joined: Fri Dec 19, 2014 1:59 am

Re: Mactrack missing tabs.

Post by sajjad321 »

I recomend create a device before creating a device type. When you created a device, you should see System Description, Snmp Object ID, and some other parameters on device page, and then enter this parameters on device type page. Usually only one "match parameter" is required. You should also select an appropriate scanning functions for your device type, i.e. for Cisco Catalyst 3750X you must select function get_catalyst_dot1dTpEntryPort, or get_generic_switch_port (function names written AFAIR, so they could be differrent).
aliiiii
JamesD
Posts: 22
Joined: Fri Feb 03, 2006 12:15 pm

Re: Mactrack missing tabs.

Post by JamesD »

The manual SQL edit posted by tbilan worked for me. Thank you!
For those of us who do not use CactiEZ CentOS or MYSQL very often, your mysql login information is located in a file
cat /root/mysqlpass.txt
You can log into mysql cacti database as follows:
mysql -uusername -ppassword cacti
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests