Most recent edit on 2006-09-21 10:53:03 by JimmyConner [Fixed Author]
Additions:
<tr><td><strong>Plugin Author</strong></td><td>The Witness</td></tr>
Deletions:
<tr><td><strong>Plugin Author</strong></td><td>Jimmy Conner</td></tr>
<tr><td><strong>Original Concept</strong></td><td>The Witness</td></tr>
Edited on 2006-02-05 06:14:51 by PsybeR
Additions:
Bug Tracker∞
Deletions:
Bug Tracker∞
Edited on 2006-01-31 11:19:48 by PsybeR
Additions:
-feature: Implement row's pulldown feature in MacTrack Viewer
Deletions:
-feature: Implement row's pulldown feature in MacTrack Viewer
Edited on 2006-01-31 11:18:35 by PsybeR
Additions:
MacTrack
Deletions:
Oldest known version of this page was edited on 2006-01-31 11:11:39 by PsybeR []
Page view:
| Description | Plugin to track device MAC/IP addresses and ports |
| Plugin Author | Jimmy Conner |
| Version | v0.1 |
| Release Date | TBD |
| Original Concept | The Witness |
Documentation
This plugin has not yet been released but is available on the
CactiEZ cd
Pre-Beta:
-bug: Modify database structure to create distinction between operating ports and active mac addresses
-bug: Correct the valid_snmp_host function that was incorrectly allowing a host to change snmp communities when it was down
-bug: Correct the storing of sysObjectID into the mac_track_devices table in Windows
-feature: Implement ignorePorts processing for pre-defined functions
-feature: Implement device and device type import functions
-feature: Implement device, device type, and port result export functions
-feature: Implement scanning_function registration in the vendor include files
-feature: Implement row's pulldown feature in
MacTrack Viewer
-feature: Use Cacti's builtin snmp functions instead of php_snmp extension
-feature: Fully implement device_types support as intended in the alpha release
-bug: Change some table Pk's to be more consistent with actual deployments
-feature: Add the snmp_port to the devices table for those who have to poke holes in firewall's to gain access to devices
-bug: Allow changing of database maintenance time to work as expected
Phase 1 Complete: You now have what I have at the office. Here are some key points/todo's:
1) Entering Device Types will not affect scanning. There is an incomplete function called mactrack_scanner.php that requires modifications prior to you being able to add/remove devices from the Device Types table and have that impact scanning.
2) There are spurious UI issues. Some have been reported to me, but I have yet been able to make time to fix. I use phpMyAdmin to add/remove rows from the main tables right now.
3) There are a few issues with the proper detection of trunk ports on Cisco devices. This will only impact scanning if some "did I do that" local configuration corner cases.
4) The "ignore ports" field is currently non-functional. I will get this fixed pretty quickly. This only has an impact if you are using a user port as an uplink (cascading switches).
5) The reset of the database maintenance time under Settings is not 100% functional. Again, time is (not in this case) money, and I have not made a cent with this...
Customization notes:
The method that I have choosen to implement verdor specific scan's is to create a file under "/lib/mactrack" called "vendor_functions.php" where "vendor" is your vendor. For example, I have "mactrack_cabletron.php" and "mactrack_cisco.php" today. I would expect an "mactrack_hp.php" and others moving forward.
The core functions are included in "mactrack_functions.php". These functions include:
valid_snmp_device - this function will take a host and first use the snmp_readstring specified for the host. If that is a valid readstring, it will return TRUE. If not, it will scan the list of snmp_readstrings in the host, and if it finds a good one, it will use it instead and update the host with the new restring as the default. If none of the readstrings work out, the host is marked "down".
find_scanning_function - this is an incomplete function that will utilize the host information and attempt to locate the correct scanning function and any special circumstances around that function.
get_arp_ip_ranges - this function scans the arp table of a device and inserts the ordered mac/ip pairs into a temporary table for later association with the device mac's.
get_generic_switch_ports - this will likely be a popular scanning function for an otherwise dumb switch. It will work with any switch where VLAN information is not required. You pass it a few standard parameters and off it goes.
get_base_dot1dTpFdbEntry_ports - this is a core function that scans the dot1d bridge table and returns valid ports to the parent function for subsequent processing. This function is critical to the overall scanning process.
xform_mac_address - this function will take an ugly mac address from snmp and format it as such "XX:XX:XX:XX:XX:XX". Pretty boring.
xform_standard_indexed_data - this function takes and OID, a device and an alternate readstring as input and returns the last octet of the OID as an index and the value as a value pair. This is a very common translation function throughout.
xform_cisco_workgroup_port_data - this function is similar to the xform_standard_indexed_data function with the exception that Cisco, for reasons unknown to me, decided to make the last 2 octets mean something like card/port. Therefore, it uses the last two to build the relationship rather than the last octet.
xform_indexed_data - this function combines the features of the previous 2 functions in that you can specify the number of octets to use in determining the association. The function could, although I havn't gotten around to it, replace the two prior functions.
db_process_add - this function essentially add's a process entry to a table that keeps track of the number of concurrently running data collection processes.
db_process_remove - this function removes a process from the process table.
db_update_device_status - this function updates a device, once it has been scanned using the mactrack_scanner.php function. It will update port counts, snmp readstrings, etc.
db_store_device_port_results - this function is pretty strait forward, once you have made the association of MAC to port for the entire switch, this function stores that data into a temporary table.
mactrack_walk - this function is essentially no longer required. It at one time optimized the snmpwalk process with snmpv2 devices by using the bulkwalk process. Since I have added this to the base 0.8.6h product, I will, at some time, remove the function.
Download∞
Feature Request/TODO List∞
Bug Tracker∞
CategoryPlugins