Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Jul 21, 2017 5:59 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Mactrack missing tabs.
PostPosted: Mon Dec 27, 2010 12:47 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 125
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.


Top
 Profile  
 
 Post subject: Re: Mactrack missing tabs.
PostPosted: Thu Dec 30, 2010 9:31 am 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 125
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?.


Top
 Profile  
 
 Post subject: Re: Mactrack missing tabs.
PostPosted: Wed Sep 18, 2013 10:30 am 
Offline

Joined: Wed Sep 18, 2013 10:24 am
Posts: 6
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:
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:
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..)


Top
 Profile  
 
 Post subject: Re: Mactrack missing tabs.
PostPosted: Wed Nov 20, 2013 1:04 pm 
Offline

Joined: Fri Sep 14, 2012 6:57 pm
Posts: 10
Instead of modifying the PHP code I decided to just edit the SQL data:
Code:
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 * 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.


Top
 Profile  
 
 Post subject: Re: Mactrack missing tabs.
PostPosted: Fri Dec 19, 2014 2:35 am 
Offline

Joined: Fri Dec 19, 2014 1:59 am
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: Mactrack missing tabs.
PostPosted: Wed Mar 09, 2016 10:36 am 
Offline

Joined: Fri Feb 03, 2006 12:15 pm
Posts: 22
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group