End Device Tracking Add-On for Cacti

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

TheWitness wrote:Cigamit,

In order to properly associate the IP's to MAC addresses for a site, you need to associate those routers with the site. If you miss a router, and it happens to carry the traffic for a specific subnet, then the association will not take place.

I will review your additional changes to add clarity and/or confirmation tonight if at all possible.

TheWitness
I've added all my routers, and the info is properly being pulled into the tables, the problem lies is that I'm running Mysql 3, while in sql, the UPDATE command is only allowed to work across tables in 4.0 and above. I will see about upgrading tonight.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Wow, Jimmy that's archaic. Since beginning with Cacti last year, always ran MySQL 4.x and above. Currently 5.x.

Larry :oops:
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?
empty_man
Posts: 12
Joined: Tue Nov 22, 2005 6:56 am

Post by empty_man »

sorry for my english ^)
first i say many thanks for all authors of cacti
this is a great work!
can any body tell my - how to install this plugin - im download zip and copy in plugins folder, add switch ( ip, community, etc) and so what?
help me please
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

TheWitness wrote:Wow, Jimmy that's archaic. Since beginning with Cacti last year, always ran MySQL 4.x and above. Currently 5.x.

Larry :oops:
Ya, but its what came by default with Fedora Core 3, which was stable enough to work with everything we do. Just upgraded my test box to FC4, and after fixing a few PHP5 problems, everything is now working properly.

Pretty sweet, now I just have to do some quick magic to make the plugin work in both php4 and php5 (chdir problems between the versions).

EDIT: Also, the IP search doesn't seem to work, since the function sanitize_search_string changes the . into spaces in the IP addresses, I will see about doing a quick work around.
jarhead
Cacti User
Posts: 59
Joined: Tue Nov 22, 2005 2:24 pm
Location: Portland, Or

How to make the mac track run right now?

Post by jarhead »

How can I force the mac track plugin to run right now? I want to test this to see if I can get some information before I input the other 200 switches. thanks
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to make the mac track run right now?

Post by cigamit »

jarhead wrote:How can I force the mac track plugin to run right now? I want to test this to see if I can get some information before I input the other 200 switches. thanks
from a command line, do this

Code: Select all

php /path/to/cacti/plugins/mac_track/poller_mactrack.php -f
If you are using PHP5, you may run into a small hitch, is so just post back your results and I will help you side step it.
jarhead
Cacti User
Posts: 59
Joined: Tue Nov 22, 2005 2:24 pm
Location: Portland, Or

Post by jarhead »

I run that and I get no output on the screen at all in my ssh window. When I go into the device tracking /devices page the 7 switches still have a status of unknown and show all 0's for the ports and such

I am running php5

I ran

/usr/local/bin/php /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php -f

I am running on freebsd 6.0 stable

I was also able to get these errors in the messages log

Nov 22 20:35:21 pdxentnms02 php: PHP Warning: main(./include/config.php): failed to open stream: No such file or directory in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 30
Nov 22 20:35:21 pdxentnms02 php: PHP Warning: main(): Failed opening './include/config.php' for inclusion (include_path='.:') in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 30
Nov 22 20:35:21 pdxentnms02 php: PHP Warning: main(/lib/poller.php): failed to open stream: No such file or directory in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 31
Nov 22 20:35:21 pdxentnms02 php: PHP Warning: main(): Failed opening '/lib/poller.php' for inclusion (include_path='.:') in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 31
Nov 22 20:35:21 pdxentnms02 php: PHP Fatal error: Call to undefined function read_config_option() in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 34
Nov 22 20:40:26 pdxentnms02 php: PHP Warning: main(./include/config.php): failed to open stream: No such file or directory in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 30
Nov 22 20:40:26 pdxentnms02 php: PHP Warning: main(): Failed opening './include/config.php' for inclusion (include_path='.:') in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 30
Nov 22 20:40:26 pdxentnms02 php: PHP Warning: main(/lib/poller.php): failed to open stream: No such file or directory in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 31
Nov 22 20:40:26 pdxentnms02 php: PHP Warning: main(): Failed opening '/lib/poller.php' for inclusion (include_path='.:') in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 31
Nov 22 20:40:26 pdxentnms02 php: PHP Fatal error: Call to undefined function read_config_option() in /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php on line 34
jarhead
Cacti User
Posts: 59
Joined: Tue Nov 22, 2005 2:24 pm
Location: Portland, Or

Post by jarhead »

I was able to get around the other errors by adding the path

from

include("./include/config.php");

to

include("/usr/local/share/cacti/include/config.php");

in the poller_mactrack.php and the mactrack_functions.php

now I get the following errors


pdxentnms02# php /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php -f
-c: not found
-c: not found
-c: not found
-c: not found
-c: not found
-c: not found
11/22/2005 09:07:00 PM - SYSTEM MACTRACK COLLECTION STATS: Time:2.0179 ConcurrentProcesses:12 Devices:2

and the log says

Nov 22 21:06:58 pdxentnms02 php: PHP Warning: Invalid argument supplied for foreach() in /usr/local/share/cacti/plugins/mac_track/lib/mactrack_functions.php on line 181
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

jarhead wrote:I was able to get around the other errors by adding the path

from

include("./include/config.php");

to

include("/usr/local/share/cacti/include/config.php");

in the poller_mactrack.php and the mactrack_functions.php

now I get the following errors


pdxentnms02# php /usr/local/share/cacti/plugins/mac_track/poller_mactrack.php -f
-c: not found
-c: not found
-c: not found
-c: not found
-c: not found
-c: not found
11/22/2005 09:07:00 PM - SYSTEM MACTRACK COLLECTION STATS: Time:2.0179 ConcurrentProcesses:12 Devices:2

and the log says

Nov 22 21:06:58 pdxentnms02 php: PHP Warning: Invalid argument supplied for foreach() in /usr/local/share/cacti/plugins/mac_track/lib/mactrack_functions.php on line 181
You can set the full path, or just remove the chdir('../../') from the beginning of poller_mactrak.php and mactrack_scanner.php

As far as for this error
-c: not found
did you set the Option under "Settings >> Paths >> snmpbulkwalk Binary Path". There should probably be an error check in there for people that haven't configured that option yet.
jarhead
Cacti User
Posts: 59
Joined: Tue Nov 22, 2005 2:24 pm
Location: Portland, Or

Post by jarhead »

Setting the snmpbulkwalk did fix the errors but now it all times out with no response from the devices... I can do a snmpwalk on them normally
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

jarhead wrote:Setting the snmpbulkwalk did fix the errors but now it all times out with no response from the devices... I can do a snmpwalk on them normally
Try doing a

Code: Select all

php -q /usr/local/share/cacti/plugins/mac_track/mactrack_scanner.php -d -id=1
And see if you get any results. (Change the -id= for your device id)
jarhead
Cacti User
Posts: 59
Joined: Tue Nov 22, 2005 2:24 pm
Location: Portland, Or

Post by jarhead »

This is what I get back

pdxentnms02 > php -q /usr/local/share/cacti/plugins/mac_track/mactrack_scanner.php -d -id=15
DEBUG: HOST: pdx1-7a-298t-b is alive, processing has begun.
11/22/2005 10:41:55 PM - POLLER: Poller[0] HOST: pdx1-7a-298t-b is alive, processing has begun.
Timeout: No Response from pdx1-7a-298t-b
Timeout: No Response from pdx1-7a-298t-b
Timeout: No Response from pdx1-7a-298t-b
DEBUG: VLAN data collected. There are -3 VLANS.
Timeout: No Response from pdx1-7a-298t-b
DEBUG: ifIndexes data collection complete
Timeout: No Response from pdx1-7a-298t-b
DEBUG: ifTypes data collection complete.
Timeout: No Response from pdx1-7a-298t-b
DEBUG: ifNames data collection complete.
DEBUG: ifInterfaces assembly complete.
Timeout: No Response from pdx1-7a-298t-b
DEBUG: portNames data collected.
Timeout: No Response from pdx1-7a-298t-b
DEBUG: portTrunking data collected.
INFO: HOST: pdx1-7a-298t-b, TYPE: STRING: Cisco Systems, Inc. WS-C2980G-A
, No active devcies on this network device.DEBUG: SQL: UPDATE mac_track_devices SET ports_total='0',vlans_total='0',ports_active='0',ports_trunk='0',snmp_readstring='$L3pk~t',snmp_sysObjectID='SNMPv2-SMI::.1.3.6.1.4.1.9.5.51',snmp_sysDescr='STRING: Cisco Systems, Inc. WS-C2980G-A
Cisco Catalyst Operating System Software, Version 6.3(10)
Copyright (c) 1995-2002 by Cisco Systems, Inc.',snmp_sysUptime='Timeticks: (3684925554) 426 days, 11:54:15.54',snmp_status='3',last_runmessage='Data collection completed ok. No active devices on this network device.',last_rundate='2005-11-22 22:29:14',last_runduration='32.2205' WHERE device_id ='15'
pdxentnms02 > php -q /usr/local/share/cacti/plugins/mac_track/mactrack_scanner.php -d -id=17
DEBUG: HOST: pdx1-7a-406t-a is alive, processing has begun.
11/22/2005 10:42:36 PM - POLLER: Poller[0] HOST: pdx1-7a-406t-a is alive, processing has begun.
ERROR: SITE: Portland, IP: pdx1-7a-406t-a, TYPE: STRING: Cisco Internetwork Operating Sys, Unsupported device.
11/22/2005 10:42:36 PM - POLLER: Poller[0] ERROR: SITE: Portland, IP: pdx1-7a-406t-a, TYPE: STRING: Cisco Internetwork Operating Sys, Unsupported device.

Timeout: No Response from pdx1-7a-406t-a
DEBUG: atifIndexes data collection complete
Timeout: No Response from pdx1-7a-406t-a
DEBUG: atPhysAddress data collection complete
Timeout: No Response from pdx1-7a-406t-a
DEBUG: atNetAddress data collection complete
DEBUG: atEntries assembly complete.
DEBUG: HOST: pdx1-7a-406t-a, IP address information collection complete
DEBUG: SQL: UPDATE mac_track_devices SET ports_total='0',vlans_total='0',ports_active='0',ports_trunk='0',snmp_readstring='$L3pk~t',snmp_sysObjectID='SNMPv2-SMI::.1.3.6.1.4.1.9.1.448',snmp_sysDescr='STRING: Cisco Internetwork Operating System Software
IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-IS-M), Version 12.1(11b)EW1, EARLY DEPLOYMENT RELEASE SOFTWARE (fc2)
TAC Support: http://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.',snmp_sysUptime='Timeticks: (721743225) 83 days, 12:50:32.25',snmp_status='4',last_runmessage='ERROR: Unsupported device.',last_rundate='2005-11-22 22:29:14',last_runduration='12.0894' WHERE device_id ='17'

I had to create new device types for both of these the top one being a catlyst 2980 running catos and the second one being a 4006/SupIII running IOS
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

When adding new devices, did you happen to manually modify mactrak_scanner.php and add your device a little down the ways (around line 129-140). Currently a few things are hard coded until they can be re-written. I am actually working on this area and hope to submit a patch to The Witness within the next day or so (maybe later with Thanksgiving coming up).
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Jarhead,

Please try and use snmpv1 for the device and see if you get better results. I have not tested any of those switch types with the current code base, so no promises.

One good thing to do would be to perform the following for each switch:

snmpbulkwalk -c <your_community> -v 2c -Cr50 <your_host> > your_host.txt

Then send the your_host.txt files to me so that I can see what's going on.

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: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cigamit,

The sanitize search function should be changed in SVN. The "." character in SVN is allowed. Please double check that you are running from SVN.

Larry
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 1 guest