mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove c3kxbar (#16304)
it is very old and there is no test data for it Could be easily added back if someone still uses it
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
require 'includes/html/graphs/device/auth.inc.php';
|
||||
|
||||
if ($auth && is_numeric($vars['mod']) && is_numeric($vars['chan'])) {
|
||||
$entity = dbFetchRow('SELECT * FROM entPhysical WHERE device_id = ? AND entPhysicalIndex = ?', [$device['device_id'], $vars['mod']]);
|
||||
|
||||
$title .= ' :: ' . $entity['entPhysicalName'];
|
||||
$title .= ' :: Fabric ' . $vars['chan'];
|
||||
|
||||
$graph_title = DeviceCache::get($device['device_id'])->shortDisplayName() . '::' . $entity['entPhysicalName'] . '::Fabric' . $vars['chan'];
|
||||
|
||||
$rrd_filename = Rrd::name($device['hostname'], ['c6kxbar', $vars['mod'], $vars['chan']]);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
$ds_in = 'inutil';
|
||||
$ds_out = 'oututil';
|
||||
|
||||
$colour_area_in = 'AA66AA';
|
||||
$colour_line_in = '330033';
|
||||
$colour_area_out = 'FFDD88';
|
||||
$colour_line_out = 'FF6600';
|
||||
|
||||
$colour_area_in_max = 'cc88cc';
|
||||
$colour_area_out_max = 'FFefaa';
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = 'Percent';
|
||||
|
||||
require 'includes/html/graphs/generic_duplex.inc.php';
|
@ -46,9 +46,6 @@ require 'overview/storage.inc.php';
|
||||
if (! isset($entity_state)) {
|
||||
$entity_state = get_dev_entity_state($device['device_id']);
|
||||
}
|
||||
if (! empty($entity_state['group']['c6kxbar'])) {
|
||||
require 'overview/c6kxbar.inc.php';
|
||||
}
|
||||
|
||||
require 'overview/toner.inc.php';
|
||||
require 'overview/sensors/charge.inc.php';
|
||||
|
@ -1,100 +0,0 @@
|
||||
<?php
|
||||
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default panel-condensed">
|
||||
<div class="panel-heading">';
|
||||
echo '<a href="device/device=' . $device['device_id'] . '/tab=health/metric=mempool/">';
|
||||
echo '<i class="fa fa-arrows fa-lg icon-theme" aria-hidden="true"></i> <strong>Catalyst 6k Crossbar</strong></a>';
|
||||
echo ' </div>
|
||||
<table class="table table-hover table-condensed table-striped">';
|
||||
|
||||
if (! isset($entity_state)) {
|
||||
$entity_state = get_dev_entity_state($device['device_id']);
|
||||
}
|
||||
foreach ($entity_state['group']['c6kxbar'] as $index => $entry) {
|
||||
// FIXME i'm not sure if this is the correct way to decide what entphysical index it is. slotnum+1? :>
|
||||
$entity = dbFetchRow('SELECT * FROM entPhysical WHERE device_id = ? AND entPhysicalIndex = ?', [$device['device_id'], $index + 1]);
|
||||
|
||||
echo "<tr>
|
||||
<td colspan='5'><strong>" . $entity['entPhysicalName'] . "</strong></td>
|
||||
<td colspan='2'>";
|
||||
|
||||
switch ($entry['']['cc6kxbarModuleModeSwitchingMode']) {
|
||||
case 'busmode':
|
||||
// echo '<a title="Modules in this mode don't use fabric. Backplane is used for both lookup and data forwarding.">Bus</a>';
|
||||
break;
|
||||
|
||||
case 'crossbarmode':
|
||||
echo '<a title="Modules in this mode use backplane for forwarding decision and fabric for data forwarding.">Crossbar</a>';
|
||||
break;
|
||||
|
||||
case 'dcefmode':
|
||||
echo '<a title="Modules in this mode use fabric for data forwarding and local forwarding is enabled.">DCEF</a>';
|
||||
break;
|
||||
|
||||
default:
|
||||
echo $entry['']['cc6kxbarModuleModeSwitchingMode'];
|
||||
}
|
||||
|
||||
echo '</td>
|
||||
</tr>';
|
||||
|
||||
foreach ($entity_state['group']['c6kxbar'][$index] as $subindex => $fabric) {
|
||||
if (is_numeric($subindex)) {
|
||||
if ($fabric['cc6kxbarModuleChannelFabStatus'] == 'ok') {
|
||||
$fabric['mode_class'] = 'green';
|
||||
} else {
|
||||
$fabric['mode_class'] = 'red';
|
||||
}
|
||||
|
||||
$percent_in = $fabric['cc6kxbarStatisticsInUtil'];
|
||||
$background_in = \LibreNMS\Util\Color::percentage($percent_in, null);
|
||||
|
||||
$percent_out = $fabric['cc6kxbarStatisticsOutUtil'];
|
||||
$background_out = \LibreNMS\Util\Color::percentage($percent_out, null);
|
||||
|
||||
$graph_array = [];
|
||||
$graph_array['height'] = '100';
|
||||
$graph_array['width'] = '210';
|
||||
$graph_array['to'] = \LibreNMS\Config::get('time.now');
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['mod'] = $index;
|
||||
$graph_array['chan'] = $subindex;
|
||||
$graph_array['type'] = 'c6kxbar_util';
|
||||
$graph_array['from'] = \LibreNMS\Config::get('time.day');
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$link_array = $graph_array;
|
||||
$link_array['page'] = 'graphs';
|
||||
unset($link_array['height'], $link_array['width'], $link_array['legend']);
|
||||
$link = \LibreNMS\Util\Url::generate($link_array);
|
||||
|
||||
$text_descr = $entity['entPhysicalName'] . ' - Fabric ' . $subindex;
|
||||
|
||||
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . ' - ' . $text_descr);
|
||||
|
||||
$graph_array['width'] = 80;
|
||||
$graph_array['height'] = 20;
|
||||
$graph_array['bg'] = 'ffffff00';
|
||||
// the 00 at the end makes the area transparent.
|
||||
$minigraph = \LibreNMS\Util\Url::lazyGraphTag($graph_array);
|
||||
|
||||
echo '<tr>
|
||||
<td></td>
|
||||
<td><strong>Fabric ' . $subindex . "</strong></td>
|
||||
<td><span style='font-weight: bold;' class=" . $fabric['mode_class'] . '>' . $fabric['cc6kxbarModuleChannelFabStatus'] . '</span></td>
|
||||
<td>' . \LibreNMS\Util\Number::formatSi($fabric['cc6kxbarModuleChannelSpeed'] * 1000000, 2, 3, 'bps') . '</td>
|
||||
<td>' . \LibreNMS\Util\Url::overlibLink($link, $minigraph, $overlib_content) . '</td>
|
||||
<td>' . print_percentage_bar(125, 20, $percent_in, 'Ingress', 'ffffff', $background_in['left'], $percent_in . '%', 'ffffff', $background_in['right']) . '</td>
|
||||
<td>' . print_percentage_bar(125, 20, $percent_out, 'Egress', 'ffffff', $background_out['left'], $percent_out . '%', 'ffffff', $background_out['right']) . '</td>
|
||||
</tr>';
|
||||
}//end if
|
||||
}//end foreach
|
||||
}//end foreach
|
||||
|
||||
echo ' </table>';
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
echo "Cisco Cat6xxx/76xx Crossbar : \n";
|
||||
|
||||
$mod_stats = snmpwalk_cache_oid($device, 'cc6kxbarModuleModeTable', [], 'CISCO-CAT6K-CROSSBAR-MIB');
|
||||
|
||||
foreach ($mod_stats as $index => $entry) {
|
||||
$group = 'c6kxbar';
|
||||
foreach ($entry as $key => $value) {
|
||||
$subindex = null;
|
||||
$entPhysical_state[$index][$subindex][$group][$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$chan_stats = snmpwalk_cache_oid($device, 'cc6kxbarModuleChannelTable', [], 'CISCO-CAT6K-CROSSBAR-MIB');
|
||||
if (! empty($chan_stats)) {
|
||||
$chan_stats = snmpwalk_cache_oid($device, 'cc6kxbarStatisticsTable', $chan_stats, 'CISCO-CAT6K-CROSSBAR-MIB');
|
||||
}
|
||||
|
||||
foreach ($chan_stats as $index => $entry) {
|
||||
[$index,$subindex] = explode('.', $index, 2);
|
||||
$group = 'c6kxbar';
|
||||
foreach ($entry as $key => $value) {
|
||||
$entPhysical_state[$index][$subindex][$group][$key] = $value;
|
||||
}
|
||||
|
||||
$rrd_name = ['c6kxbar', $index, $subindex];
|
||||
$rrd_def = RrdDefinition::make()
|
||||
->addDataset('inutil', 'GAUGE', 0, 100)
|
||||
->addDataset('oututil', 'GAUGE', 0, 100)
|
||||
->addDataset('outdropped', 'DERIVE', 0, 125000000000)
|
||||
->addDataset('outerrors', 'DERIVE', 0, 125000000000)
|
||||
->addDataset('inerrors', 'DERIVE', 0, 125000000000);
|
||||
|
||||
$fields = [
|
||||
'inutil' => $entry['cc6kxbarStatisticsInUtil'],
|
||||
'oututil' => $entry['cc6kxbarStatisticsOutUtil'],
|
||||
'outdropped' => $entry['cc6kxbarStatisticsOutDropped'],
|
||||
'outerrors' => $entry['cc6kxbarStatisticsOutErrors'],
|
||||
'inerrors' => $entry['cc6kxbarStatisticsInErrors'],
|
||||
];
|
||||
|
||||
$tags = compact('index', 'subindex', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'c6kxbar', $tags, $fields);
|
||||
}//end foreach
|
@ -2456,14 +2456,6 @@ parameters:
|
||||
count: 1
|
||||
path: includes/html/graphs/bill/historicbits.inc.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated function dbFetchRow\\(\\)\\:
|
||||
Please use Eloquent instead; https\\://laravel\\.com/docs/eloquent$#
|
||||
"""
|
||||
count: 1
|
||||
path: includes/html/graphs/c6kxbar/auth.inc.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated function dbFetchRow\\(\\)\\:
|
||||
|
Reference in New Issue
Block a user