mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
Update DSL stats even if port is down (#12262)
* Update DSL stats even if port is down * Correct swapped Upload/download on graphs * Display attainable line speed in the ADSL page * Correct SNR graph * Rewrite labels to avoid misunderstanding * last swap I hope
This commit is contained in:
parent
d82d2f1f19
commit
9797be3677
@ -3,12 +3,12 @@
|
||||
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Downstream';
|
||||
$rrd_list[0]['ds'] = 'AtucCurrAttainableR';
|
||||
$rrd_list[0]['descr'] = 'Central to CPE';
|
||||
$rrd_list[0]['ds'] = 'AturCurrAttainableR';
|
||||
|
||||
$rrd_list[1]['filename'] = $rrd_filename;
|
||||
$rrd_list[1]['descr'] = 'Upstream';
|
||||
$rrd_list[1]['ds'] = 'AturCurrAttainableR';
|
||||
$rrd_list[1]['descr'] = 'CPE to Central';
|
||||
$rrd_list[1]['ds'] = 'AtucCurrAttainableR';
|
||||
|
||||
$unit_text = 'Bits/sec';
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Downstream';
|
||||
$rrd_list[0]['ds'] = 'AtucCurrAtn';
|
||||
$rrd_list[0]['descr'] = 'Central to CPE';
|
||||
$rrd_list[0]['ds'] = 'AturCurrAtn';
|
||||
|
||||
$rrd_list[1]['filename'] = $rrd_filename;
|
||||
$rrd_list[1]['descr'] = 'Upstream';
|
||||
$rrd_list[1]['ds'] = 'AturCurrAtn';
|
||||
$rrd_list[1]['descr'] = 'CPE to Central';
|
||||
$rrd_list[1]['ds'] = 'AtucCurrAtn';
|
||||
|
||||
$unit_text = 'dB';
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Downstream';
|
||||
$rrd_list[0]['ds'] = 'AtucCurrOutputPwr';
|
||||
$rrd_list[0]['descr'] = 'Central';
|
||||
$rrd_list[0]['ds'] = 'AturCurrOutputPwr';
|
||||
|
||||
$rrd_list[1]['filename'] = $rrd_filename;
|
||||
$rrd_list[1]['descr'] = 'Upstream';
|
||||
$rrd_list[1]['ds'] = 'AturCurrOutputPwr';
|
||||
$rrd_list[1]['descr'] = 'CPE';
|
||||
$rrd_list[1]['ds'] = 'AtucCurrOutputPwr';
|
||||
|
||||
$unit_text = 'dBm';
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Downstream';
|
||||
$rrd_list[0]['ds'] = 'AtucCurrSnrMgn';
|
||||
$rrd_list[0]['descr'] = 'Central to CPE';
|
||||
$rrd_list[0]['ds'] = 'AturCurrSnrMgn';
|
||||
|
||||
$rrd_list[1]['filename'] = $rrd_filename;
|
||||
$rrd_list[1]['descr'] = 'Upstream';
|
||||
$rrd_list[1]['ds'] = 'AturCurrSnrMgn';
|
||||
$rrd_list[1]['descr'] = 'CPE to Central';
|
||||
$rrd_list[1]['ds'] = 'AtucCurrSnrMgn';
|
||||
|
||||
$unit_text = 'dB';
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl');
|
||||
|
||||
$rrd_list[0]['filename'] = $rrd_filename;
|
||||
$rrd_list[0]['descr'] = 'Downstream';
|
||||
$rrd_list[0]['descr'] = 'Central to CPE';
|
||||
$rrd_list[0]['ds'] = 'AtucChanCurrTxRate';
|
||||
|
||||
$rrd_list[1]['filename'] = $rrd_filename;
|
||||
$rrd_list[1]['descr'] = 'Upstream';
|
||||
$rrd_list[1]['descr'] = 'CPE to Central';
|
||||
$rrd_list[1]['ds'] = 'AturChanCurrTxRate';
|
||||
|
||||
$unit_text = 'Bits/sec';
|
||||
|
@ -2,11 +2,16 @@
|
||||
|
||||
if (file_exists(get_port_rrdfile_path($device['hostname'], $port['port_id'], 'adsl'))) {
|
||||
$iid = $id;
|
||||
echo '<div class=graphhead>ADSL Line Speed</div>';
|
||||
echo '<div class=graphhead>ADSL Current Line Speed</div>';
|
||||
$graph_type = 'port_adsl_speed';
|
||||
|
||||
include 'includes/html/print-interface-graphs.inc.php';
|
||||
|
||||
echo '<div class=graphhead>ADSL Attainable Speed</div>';
|
||||
$graph_type = 'port_adsl_attainable';
|
||||
|
||||
include 'includes/html/print-interface-graphs.inc.php';
|
||||
|
||||
echo '<div class=graphhead>ADSL Line Attenuation</div>';
|
||||
$graph_type = 'port_adsl_attenuation';
|
||||
|
||||
|
@ -146,9 +146,9 @@ if ($port_adsl['adslLineCoding']) {
|
||||
// adslAtucCurrAttainableRate is UploadMaxRate
|
||||
echo 'Max:' . formatRates($port_adsl['adslAturCurrAttainableRate']) . '/' . formatRates($port_adsl['adslAtucCurrAttainableRate']);
|
||||
echo "</td><td width=150 onclick=\"location.href='" . generate_port_url($port) . "'\" >";
|
||||
echo 'Atten:' . $port_adsl['adslAtucCurrAtn'] . 'dB/' . $port_adsl['adslAturCurrAtn'] . 'dB';
|
||||
echo 'Atten:' . $port_adsl['adslAturCurrAtn'] . 'dB/' . $port_adsl['adslAtucCurrAtn'] . 'dB';
|
||||
echo '<br />';
|
||||
echo 'SNR:' . $port_adsl['adslAtucCurrSnrMgn'] . 'dB/' . $port_adsl['adslAturCurrSnrMgn'] . 'dB';
|
||||
echo 'SNR:' . $port_adsl['adslAturCurrSnrMgn'] . 'dB/' . $port_adsl['adslAtucCurrSnrMgn'] . 'dB';
|
||||
} else {
|
||||
echo "</td><td width=150 onclick=\"location.href='" . generate_port_url($port) . "'\" >";
|
||||
if ($port['ifType'] && $port['ifType'] != '') {
|
||||
|
@ -734,8 +734,9 @@ foreach ($ports as $port) {
|
||||
if (! empty($port['skipped'])) {
|
||||
// We don't care about statistics for skipped selective polling ports
|
||||
d_echo("$port_id skipped because selective polling ports is set.");
|
||||
} elseif ($port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && $this_port['ifLastChange'] == $port['ifLastChange']) {
|
||||
} elseif ($port['ifType'] != 'adsl' && $port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && $this_port['ifLastChange'] == $port['ifLastChange']) {
|
||||
// We don't care about statistics for down ports on which states did not change since last polling
|
||||
// We still take into account 'adsl' ports that may update speed/noise even if the interface is status down
|
||||
d_echo("$port_id skipped because port is still down since last polling.");
|
||||
} else {
|
||||
// End parse ifAlias
|
||||
|
Loading…
Reference in New Issue
Block a user