diff --git a/database-update.sql b/database-update.sql index 092ccff9f..a054e6967 100644 --- a/database-update.sql +++ b/database-update.sql @@ -33,6 +33,7 @@ ALTER TABLE `ports` MODIFY `port_descr_type` VARCHAR(255); RENAME TABLE `vmware_vminfo` TO `vminfo` ; ALTER TABLE `vminfo` ADD `vm_type` VARCHAR(16) NOT NULL DEFAULT 'vmware' AFTER `device_id`; CREATE TABLE IF NOT EXISTS `cef_switching` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` int(11) NOT NULL, `afi` varchar(4) COLLATE utf8_unicode_ci NOT NULL, `cef_index` int(11) NOT NULL, `cef_path` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `drop` int(11) NOT NULL, `punt` int(11) NOT NULL, `punt2host` int(11) NOT NULL, `drop_prev` int(11) NOT NULL, `punt_prev` int(11) NOT NULL, `punt2host_prev` int(11) NOT NULL,`updated` INT NOT NULL , `updated_prev` INT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE `mac_accounting` CHANGE `peer_mac` `mac` VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL +ALTER TABLE `mac_accounting` CHANGE `peer_mac` `mac` VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; ALTER TABLE `mac_accounting` DROP `peer_ip`, DROP `peer_desc`, DROP `peer_asn`; UPDATE sensors SET sensor_class='frequency' WHERE sensor_class='freq'; +ALTER TABLE `cef_switching` ADD `cef_switching_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; diff --git a/html/includes/graphs/cefswitching/auth.inc.php b/html/includes/graphs/cefswitching/auth.inc.php new file mode 100644 index 000000000..07e2bc92b --- /dev/null +++ b/html/includes/graphs/cefswitching/auth.inc.php @@ -0,0 +1,20 @@ + diff --git a/html/includes/graphs/cefswitching/graph.inc.php b/html/includes/graphs/cefswitching/graph.inc.php new file mode 100644 index 000000000..3cb0d4704 --- /dev/null +++ b/html/includes/graphs/cefswitching/graph.inc.php @@ -0,0 +1,28 @@ + diff --git a/html/includes/graphs/port/nupkts.inc.php b/html/includes/graphs/port/nupkts.inc.php index 71a8c8bda..d33738b03 100644 --- a/html/includes/graphs/port/nupkts.inc.php +++ b/html/includes/graphs/port/nupkts.inc.php @@ -3,28 +3,28 @@ # FIXME uhh.. if (1) { - $rrd_list[1]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"); - $rrd_list[1]['descr'] = $int['ifDescr']; - $rrd_list[1]['rra_in'] = "INNUCASTPKTS"; - $rrd_list[1]['rra_out'] = "OUTNUCASTPKTS"; - $rrd_list[1]['descr'] = "NonUnicast"; - $rrd_list[1]['colour_area_in'] = "BB77BB"; - $rrd_list[1]['colour_area_out'] = "FFDD88"; +# $rrd_list[1]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"); +# $rrd_list[1]['descr'] = $int['ifDescr']; +# $rrd_list[1]['rra_in'] = "INNUCASTPKTS"; +# $rrd_list[1]['rra_out'] = "OUTNUCASTPKTS"; +# $rrd_list[1]['descr'] = "NonUnicast"; +# $rrd_list[1]['colour_area_in'] = "BB77BB"; +# $rrd_list[1]['colour_area_out'] = "FFDD88"; $rrd_list[2]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"); $rrd_list[2]['descr'] = $int['ifDescr']; $rrd_list[2]['rra_in'] = "INBROADCASTPKTS"; $rrd_list[2]['rra_out'] = "OUTBROADCASTPKTS"; $rrd_list[2]['descr'] = "Broadcast"; - $rrd_list[2]['colour_area_in'] = "aa77BB"; - $rrd_list[2]['colour_area_out'] = "eeDD88"; + $rrd_list[2]['colour_area_in'] = "aa37BB"; + $rrd_list[2]['colour_area_out'] = "ee9D88"; $rrd_list[4]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"); $rrd_list[4]['descr'] = $int['ifDescr']; $rrd_list[4]['rra_in'] = "INMULTICASTPKTS"; $rrd_list[4]['rra_out'] = "OUTMULTICASTPKTS"; $rrd_list[4]['descr'] = "Multicast"; - $rrd_list[4]['colour_area_in'] = "805080"; + $rrd_list[4]['colour_area_in'] = "905090"; $rrd_list[4]['colour_area_out'] = "c0a060"; $units=''; @@ -60,4 +60,4 @@ elseif (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename( include("includes/graphs/generic_duplex.inc.php"); } -?> \ No newline at end of file +?> diff --git a/html/pages/device/cefswitching.inc.php b/html/pages/device/cefswitching.inc.php index 472c341cb..8f66cf625 100644 --- a/html/pages/device/cefswitching.inc.php +++ b/html/pages/device/cefswitching.inc.php @@ -90,6 +90,23 @@ while ($cef = mysql_fetch_assoc($cef_query)) echo(" "); + + if($_GET['opta'] == "graphs") + { + $graph_array['height'] = "100"; + $graph_array['width'] = "215"; + $graph_array['to'] = $now; + $graph_array['id'] = $cef['cef_switching_id']; + $graph_array['type'] = "cefswitching_graph"; + + echo("