End Device Tracking Add-On for Cacti

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
kingaru
Cacti User
Posts: 54
Joined: Wed Mar 09, 2005 6:35 am

MacTrack database?

Post by kingaru »

Sorry for stupid question ... MacTrack tables for mysql should they be part of which database? MacTrack? Cacti? or something else ?
the MacTrack.sql file does not create any new databases and does not inser table structure in in any exiting databases ....

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

Post by TheWitness »

mysql -u root -p cacti < mactrack.sql

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 »

Doh! Was that in the instructions (adding db)?! :)

Now I can add devices and create site but I'm getting this using the -f option:

# php5 /usr/share/cacti/plugins/mac_track/poller_mactrack.php -f
PHP Warning: main(./include/config.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 25
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening './include/config.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 25
PHP Notice: Undefined variable: config in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 26
PHP Warning: main(/lib/snmp.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 26
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/lib/snmp.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 26
PHP Notice: Undefined variable: config in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 27
PHP Warning: main(/lib/ping.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 27
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/lib/ping.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 27
PHP Notice: Undefined variable: config in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 28
PHP Warning: main(/lib/functions.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 28
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/lib/functions.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 28
PHP Notice: Undefined variable: config in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 30
PHP Warning: main(/plugins/mac_track/lib/mactrack_functions.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 30
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/plugins/mac_track/lib/mactrack_functions.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 30
PHP Notice: Undefined variable: config in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 31
PHP Warning: main(/plugins/mac_track/lib/mactrack_cabletron.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 31
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/plugins/mac_track/lib/mactrack_cabletron.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 31
PHP Notice: Undefined variable: config in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 32
PHP Warning: main(/plugins/mac_track/lib/mactrack_cisco.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 32
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/plugins/mac_track/lib/mactrack_cisco.php' for inclusion (include_path='/usr/share/php5') in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 32
PHP Fatal error: Call to undefined function read_config_option() in /usr/share/cacti/plugins/mac_track/mactrack_scanner.php on line 39<SNIP MORE OF THE SAME>
Content-type: text/html
X-Powered-By: PHP/5.0.4

12/28/2005 04:45:49 PM - SYSTEM MACTRACK COLLECTION STATS: Time:2.0277 ConcurrentProcesses:8 Devices:3

Any thoughts on this one?
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

knobdy wrote:Doh! Was that in the instructions (adding db)?! :)

Now I can add devices and create site but I'm getting this using the -f option:

# php5 /usr/share/cacti/plugins/mac_track/poller_mactrack.php -f
PHP Warning: main(./include/config.php)

Any thoughts on this one?
Try openning poller_mactrack.php and uncomment out these lines

if (strpos($dir, 'mac_track') !== false)
chdir('../../');

near the beginning and see if that helps. Or change to the cacti directory before you run it. I had weird issues with PHP5 and the path, but I thought I had resolved that. My php5 box is at work, which I can't access for a few days.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

I think that's it and will give it a try tomorrow morning!

"Can't" get to a box at work for a couple of days? Give me that problem would ya!
kingaru
Cacti User
Posts: 54
Joined: Wed Mar 09, 2005 6:35 am

DB

Post by kingaru »

TheWitness wrote:mysql -u root -p cacti < mactrack.sql

TheWitness
Since for most (all?) of plugins we have individual DB's would it make sense to keep this one separately as well?

Igor
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: DB

Post by cigamit »

kingaru wrote:
TheWitness wrote:mysql -u root -p cacti < mactrack.sql

TheWitness
Since for most (all?) of plugins we have individual DB's would it make sense to keep this one separately as well?

Igor
The only other plugin I can recall that has a seperate database is the Syslog plugin (but it can run in the same database if necessary). I can tell you from experience (I originally converting the syslog add-on to a plugin), it really is much easier to keep the tables in the same database programming wise. You have to load your DB connection for your stuff, and then reload the Cacti DB when you pass control to any of the Cacti functions that require connecting to the DB.
Dwayne_Dibbley
Cacti User
Posts: 52
Joined: Sun Sep 18, 2005 3:38 pm

Post by Dwayne_Dibbley »

I am running win Win32 with G version, plugin arch for G.

Went to user management and added MAC_Track to reveal the TAB fine.

Went to add SITE, Sve failed. Looked in MySQL no MAC tables, manually ran the sql script to create the tables, Re ran add site Site added OK.

Added one Router ( CISCO 3640 ) to this site entered all SNMP details. using V2. Device added OK and SNMP returning IOS version etc.

Device status shows as Unknown and no details in mactrack tab.

I am guessing that the poller is not picking up the mac track plugin and therefore not running the DB script and other files?

Thanks looks good

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

Post by TheWitness »

All,

I am working on several changes to the package this week. Please be patient.

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?
Allen K
Posts: 25
Joined: Sat Oct 15, 2005 9:34 pm

Thanks

Post by Allen K »

Having issues with this script as well. I would also like to know if there is support for Baystack BPS2000, or 425_24T switches by Nortel? I can provide access to many of these switches with devices if required.. Really looking forward to this plugin for Cacti, Thanks for all your hard work !!!!
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

So when you begin adding devices to a site, what MUST you have in order for it to work? In this building we have layer 3 switches on each floor, with a 6500 in the data center with sup modules.

Does this mean I would create one site for the building?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I would create 1 site for each collection of Layer2/3 switches serviced by a single group of routers. The idea is that you want to align all the switches into a collection who's router will have the IP to MAC associations for those switches.

If you are performing Layer3 switching and you have no Layer 2 trunk groups, then a site could be as small as 1 Layer3 switch.

In your case, you may want to create a site based upon the switches serviced by the MSFC's in your distribution routers, even though the switches are Layer3.

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

Post by TheWitness »

Allen K,

Please send me a PM with read communities and IP addresses. I can send you my source IP if required. I am working on this project from home this week and am getting pretty close to this and another outstanding request of the same type for another user for HP Procurve switches.

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 »

cigamit wrote:Try openning poller_mactrack.php and uncomment out these lines

if (strpos($dir, 'mac_track') !== false)
chdir('../../');

near the beginning and see if that helps. Or change to the cacti directory before you run it. I had weird issues with PHP5 and the path, but I thought I had resolved that. My php5 box is at work, which I can't access for a few days.
They were already uncommented and I've tried them commented out as well. I've also tried running if from /cacti and /cacti/plugins/mac_track as well as copying the poller_mactrack.php to the /cacti/include folder and running it. What I'm still seing is:
<snip>
Perhaps my box's path is missing something?

Forget what I was getting, I edited the php files with my exact cacti path and tried it:
/usr/share/cacti/plugins/mac_track # php5 poller_mactrack.php -f
sh: - : invalid option
Usage: sh [GNU long option] [option] ...
sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
-->GIVES THE ABOVE THREE TIMES<--
PHP Warning: Invalid argument supplied for foreach() in /usr/share/cacti/plugins/mac_track/lib/mactrack_functions.php on line 181
Content-type: text/html
X-Powered-By: PHP/5.0.4

12/29/2005 11:43:49 AM - SYSTEM MACTRACK COLLECTION STATS: Time:2.0162 ConcurrentProcesses:8 Devices:1

Now this is really confusing... :) I'm hoping this all helps as you folks continue to work on it.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Looks like you might be running in PHP Safe mode, or the force option is being improperly passed to exec background, which I can't see happening.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests