|
|
| Author |
Message |
peecee
Joined: 26 Feb 2008 Posts: 43
|
Posted: Wed Feb 27, 2008 4:14 pm Post subject: MAC Track Color Tab bug |
|
|
When I select the mactrack tab, the color of the tab is not updated to red - it stays blue. I have the following installed:
Cacti 0.8.7b
PIA 2.0
Settings plugin
Thold plugin
Also, should the menu bar on the left side of the screen disappear when the mactrack tab is selected? It seems like it should stay there.
|
|
| Back to top |
|
 |
niobe Cacti User
Joined: 10 Mar 2008 Posts: 94 Location: Australia
|
Posted: Sat Mar 29, 2008 6:52 pm Post subject: |
|
|
Corrupt documentation in 1.1...please repackage
Also does not appear to work correctly with PA2.0 as sql is not automatically imported.
|
|
| Back to top |
|
 |
iancw
Joined: 15 Apr 2008 Posts: 4
|
Posted: Thu Apr 17, 2008 4:44 am Post subject: |
|
|
| Anybody get mactrack working for Cisco 3500XL switches? Could you please tell me how to get this working, it's not discovering the interfaces properly.
|
|
| Back to top |
|
 |
prof
Joined: 11 Jul 2008 Posts: 7
|
Posted: Tue Aug 05, 2008 9:21 am Post subject: |
|
|
A feature request.
Some of my switches only show a number for the portname. Please could you add a custom column where we could insert a custom name for that port on the switch? A seperate table with a primary key (switch id + port number) and Name as a string, that would be great or implement it into a already existing table such mactrack_interfaces?
I think i could implement it, but you understand your addon better than me.
The second feature request is as follows. We have some DL380 which are connected to a Procurve 2824. On that DL380 i have configured a HP Network team. This is schown in SNMP not with ethernetCsmacd(6) but with ieee8023adLag(161). I have patched mactrack_functions and my scanning function that i use. Now these Ports are displayed. So User Ports are not between 6 and 9 there is also a 161.
In function get_base_dot1dTpFdbEntry_ports
| Code: | function get_base_dot1dTpFdbEntry_ports($site, &$device, &$ifInterfaces, $snmp_readstring = "", $store_to_db = TRUE, $lowPort = 1, $highPort = 9999) {
global $debug, $scan_date;
/* initialize variables */
$port_keys = array();
$return_array = array();
$new_port_key_array = array();
$port_key_array = array();
$port_number = 0;
$ports_active = 0;
$active_ports = 0;
$ports_total = 0;
/* cisco uses a hybrid read string, if one is not defined, use the default */
if ($snmp_readstring == "") {
$snmp_readstring = $device["snmp_readstring"];
}
/* get the operational status of the ports */
$active_ports_array = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.8", $device);
$indexes = array_keys($active_ports_array);
$i = 0;
foreach($active_ports_array as $port_info) {
if ((($ifInterfaces[$indexes[$i]]["ifType"] >= 6) &&
($ifInterfaces[$indexes[$i]]["ifType"] <= 9)) ||
($ifInterfaces[$indexes[$i]]["ifType"] == 161)) {
mactrack_debug("INFOME: ".$port_info." - ".$ifInterfaces[$indexes[$i]]["ifType"]);
if ($port_info == 1) {
$ports_active++;
}
$ports_total++;
}
$i++;
}
if ($store_to_db) {
print("INFO: HOST: " . $device["hostname"] . ", TYPE: " . substr($device["snmp_sysDescr"],0,40) . ", TOTAL PORTS: " . $ports_total . ", OPER PORTS: " . $ports_active);
if ($debug) {
print("\n");
}
$device["ports_active"] = $ports_active;
$device["ports_total"] = $ports_total;
$device["macs_active"] = 0;
}
if ($ports_active > 0) {
/* get bridge port to ifIndex mapping */
$bridgePortIfIndexes = xform_standard_indexed_data(".1.3.6.1.2.1.17.1.4.1.2", $device, $snmp_readstring);
$port_status = xform_stripped_oid(".1.3.6.1.2.1.17.4.3.1.3", $device, $snmp_readstring);
/* get device active port numbers */
$port_numbers = xform_stripped_oid(".1.3.6.1.2.1.17.4.3.1.2", $device, $snmp_readstring);
/* get the ignore ports list from device */
$ignore_ports = port_list_to_array($device["ignorePorts"]);
/* determine user ports for this device and transfer user ports to
a new array.
*/
$i = 0;
foreach ($port_numbers as $key => $port_number) {
if (($highPort == 0) ||
(($port_number >= $lowPort) &&
($port_number <= $highPort))) {
if (!in_array($port_number, $ignore_ports)) {
if (@$port_status[$key] == "3") {
$port_key_array[$i]["key"] = $key;
$port_key_array[$i]["port_number"] = $port_number;
$i++;
}
}
}
}
/* compare the user ports to the brige port data, store additional
relevant data about the port.
*/
$i = 0;
foreach ($port_key_array as $port_key) {
/* map bridge port to interface port and check type */
if ($port_key["port_number"] > 0) {
if (sizeof($bridgePortIfIndexes) != 0) {
/* some hubs do not always return a port number in the bridge table.
test for it by isset and substiture the port number from the ifTable
if it isnt in the bridge table
*/
if (isset($bridgePortIfIndexes[$port_key["port_number"]])) {
$brPortIfIndex = @$bridgePortIfIndexes[$port_key["port_number"]];
}else{
$brPortIfIndex = @$port_key["port_number"];
}
$brPortIfType = @$ifInterfaces[$brPortIfIndex]["ifType"];
}else{
$brPortIfIndex = $port_key["port_number"];
$brPortIfType = @$ifInterfaces[$port_key["port_number"]]["ifType"];
}
if ( ( (($brPortIfType >= 6) &&
($brPortIfType <= 9)) ||
($brPortIfType == 161)
) &&
(!isset($ifInterfaces[$brPortIfIndex]["portLink"]))) {
/* set some defaults */
$new_port_key_array[$i]["vlan_id"] = "N/A";
$new_port_key_array[$i]["vlan_name"] = "N/A";
$new_port_key_array[$i]["mac_address"] = "NOT USER";
$new_port_key_array[$i]["port_number"] = "NOT USER";
$new_port_key_array[$i]["port_name"] = "N/A";
/* now set the real data */
$new_port_key_array[$i]["key"] = $port_key["key"];
$new_port_key_array[$i]["port_number"] = $port_key["port_number"];
$i++;
}
}
}
mactrack_debug("Port number information collected.");
/* map mac address */
/* only continue if there were user ports defined */
if (sizeof($new_port_key_array) > 0) {
/* get the bridges active MAC addresses */
$port_macs = xform_stripped_oid(".1.3.6.1.2.1.17.4.3.1.1", $device, $snmp_readstring);
foreach ($port_macs as $key => $port_mac) {
$port_macs[$key] = xform_mac_address($port_mac);
}
foreach ($new_port_key_array as $key => $port_key) {
$new_port_key_array[$key]["mac_address"] = @$port_macs[$port_key["key"]];
mactrack_debug("INDEX: '". $key . "' MAC ADDRESS: " . $new_port_key_array[$key]["mac_address"]);
}
mactrack_debug("Port mac address information collected.");
}else{
mactrack_debug("No user ports on this network.");
}
}else{
mactrack_debug("No user ports on this network.");
}
if ($store_to_db) {
if ($ports_active <= 0) {
$device["last_runmessage"] = "Data collection completed ok";
}elseif (sizeof($new_port_key_array) > 0) {
$device["last_runmessage"] = "Data collection completed ok";
$device["macs_active"] = sizeof($new_port_key_array);
db_store_device_port_results($device, $new_port_key_array, $scan_date);
}else{
$device["last_runmessage"] = "WARNING: Poller did not find active ports on this device.";
}
if(!$debug) {
print(" - Complete\n");
}
}else{
return $new_port_key_array;
}
}
|
|
|
| Back to top |
|
 |
streaker69 Cacti Pro User
Joined: 27 Mar 2006 Posts: 634 Location: Psychic Amish Network Administrator
|
Posted: Wed Aug 13, 2008 1:48 pm Post subject: |
|
|
One little quick fix so that you can properly sort by Port Number.
Change port_number in the mac_track_ports table from vchar to int.
| Description: |
|
| Filesize: |
3.65 KB |
| Viewed: |
158 Time(s) |

|
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|