mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Fix Riverbed optimization polling (#5622)
This commit is contained in:
committed by
Neil Lathwood
parent
0dd5f84cca
commit
c11e2bfd13
@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_connections');
|
|||||||
$scale_min = 0;
|
$scale_min = 0;
|
||||||
$colours = 'mixed';
|
$colours = 'mixed';
|
||||||
$unit_text = 'Connections';
|
$unit_text = 'Connections';
|
||||||
$unitlen = 10;
|
$unitlen = 11;
|
||||||
$bigdescrlen = 15;
|
$bigdescrlen = 15;
|
||||||
$smalldescrlen = 15;
|
$smalldescrlen = 15;
|
||||||
$dostack = 0;
|
$dostack = 0;
|
||||||
@@ -37,14 +37,14 @@ $data_sources = array(
|
|||||||
'half_open' => array('descr' => 'Half open','colour' => '66873e',),
|
'half_open' => array('descr' => 'Half open','colour' => '66873e',),
|
||||||
'half_closed' => array('descr' => 'Half closed','colour' => 'f49842',),
|
'half_closed' => array('descr' => 'Half closed','colour' => 'f49842',),
|
||||||
'established' => array('descr' => 'Established','colour' => '438099',),
|
'established' => array('descr' => 'Established','colour' => '438099',),
|
||||||
'closed' => array('descr' => 'Closed','colour' => 'af2121',),
|
'active' => array('descr' => 'Active','colour' => 'af2121',),
|
||||||
'total' => array('descr' => 'Total','colour' => '000000',)
|
'total' => array('descr' => 'Total','colour' => '000000',)
|
||||||
);
|
);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||||
foreach ($array as $ds => $vars) {
|
foreach ($data_sources as $ds => $vars) {
|
||||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||||
$rrd_list[$i]['ds'] = $ds;
|
$rrd_list[$i]['ds'] = $ds;
|
||||||
|
@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_datastore');
|
|||||||
$scale_min = 0;
|
$scale_min = 0;
|
||||||
$colours = 'mixed';
|
$colours = 'mixed';
|
||||||
$unit_text = 'Datastore';
|
$unit_text = 'Datastore';
|
||||||
$unitlen = 10;
|
$unitlen = 9;
|
||||||
$bigdescrlen = 15;
|
$bigdescrlen = 15;
|
||||||
$smalldescrlen = 15;
|
$smalldescrlen = 15;
|
||||||
$dostack = 0;
|
$dostack = 0;
|
||||||
@@ -42,7 +42,7 @@ $i = 0;
|
|||||||
|
|
||||||
|
|
||||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||||
foreach ($array as $ds => $vars) {
|
foreach ($data_sources as $ds => $vars) {
|
||||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||||
$rrd_list[$i]['ds'] = $ds;
|
$rrd_list[$i]['ds'] = $ds;
|
||||||
|
@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_optimization');
|
|||||||
$scale_min = 0;
|
$scale_min = 0;
|
||||||
$colours = 'mixed';
|
$colours = 'mixed';
|
||||||
$unit_text = 'Optimized connections';
|
$unit_text = 'Optimized connections';
|
||||||
$unitlen = 10;
|
$unitlen = 21;
|
||||||
$bigdescrlen = 15;
|
$bigdescrlen = 15;
|
||||||
$smalldescrlen = 15;
|
$smalldescrlen = 15;
|
||||||
$dostack = 0;
|
$dostack = 0;
|
||||||
@@ -41,7 +41,7 @@ $data_sources = array(
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||||
foreach ($array as $ds => $vars) {
|
foreach ($data_sources as $ds => $vars) {
|
||||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||||
$rrd_list[$i]['ds'] = $ds;
|
$rrd_list[$i]['ds'] = $ds;
|
||||||
|
@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_passthrough');
|
|||||||
$scale_min = 0;
|
$scale_min = 0;
|
||||||
$colours = 'mixed';
|
$colours = 'mixed';
|
||||||
$unit_text = 'Bandwidth Passthrough';
|
$unit_text = 'Bandwidth Passthrough';
|
||||||
$unitlen = 10;
|
$unitlen = 21;
|
||||||
$bigdescrlen = 15;
|
$bigdescrlen = 15;
|
||||||
$smalldescrlen = 15;
|
$smalldescrlen = 15;
|
||||||
$dostack = 0;
|
$dostack = 0;
|
||||||
@@ -42,7 +42,7 @@ $data_sources = array(
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||||
foreach ($array as $ds => $vars) {
|
foreach ($data_sources as $ds => $vars) {
|
||||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||||
$rrd_list[$i]['ds'] = $ds;
|
$rrd_list[$i]['ds'] = $ds;
|
||||||
|
@@ -53,7 +53,7 @@ if ($conn_half_open >= 0 && $conn_half_closed >= 0 && $conn_established >= 0 &&
|
|||||||
'half_open' => $conn_half_open,
|
'half_open' => $conn_half_open,
|
||||||
'half_closed' => $conn_half_closed,
|
'half_closed' => $conn_half_closed,
|
||||||
'established' => $conn_established,
|
'established' => $conn_established,
|
||||||
'active' => $conn_established,
|
'active' => $conn_active,
|
||||||
'total' => $conn_total,
|
'total' => $conn_total,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ $datastore_array = array(
|
|||||||
'.1.3.6.1.4.1.17163.1.1.5.4.1.0',
|
'.1.3.6.1.4.1.17163.1.1.5.4.1.0',
|
||||||
'.1.3.6.1.4.1.17163.1.1.5.4.2.0',
|
'.1.3.6.1.4.1.17163.1.1.5.4.2.0',
|
||||||
);
|
);
|
||||||
$datastore = snmp_get_multi_oid($device, $conn_array);
|
$datastore = snmp_get_multi_oid($device, $datastore_array);
|
||||||
|
|
||||||
$datastore_hits = $datastore['.1.3.6.1.4.1.17163.1.1.5.4.1.0'];
|
$datastore_hits = $datastore['.1.3.6.1.4.1.17163.1.1.5.4.1.0'];
|
||||||
$datastore_miss = $datastore['.1.3.6.1.4.1.17163.1.1.5.4.2.0'];
|
$datastore_miss = $datastore['.1.3.6.1.4.1.17163.1.1.5.4.2.0'];
|
||||||
@@ -124,8 +124,8 @@ if ($conn_optimized >= 0 && $conn_passthrough >= 0) {
|
|||||||
|
|
||||||
$tags = compact('rrd_def');
|
$tags = compact('rrd_def');
|
||||||
|
|
||||||
data_update($device, 'riverbed_optimisation', $tags, $fields);
|
data_update($device, 'riverbed_optimization', $tags, $fields);
|
||||||
$graphs['riverbed_optimisation'] = true;
|
$graphs['riverbed_optimization'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bandwidth passthrough
|
/* bandwidth passthrough
|
||||||
@@ -150,9 +150,9 @@ $bw_total = $bandwidth['.1.3.6.1.4.1.17163.1.1.5.3.3.3.0'];
|
|||||||
|
|
||||||
if ($bw_in >= 0 && $bw_out >= 0 && $bw_total >= 0) {
|
if ($bw_in >= 0 && $bw_out >= 0 && $bw_total >= 0) {
|
||||||
$rrd_def = array(
|
$rrd_def = array(
|
||||||
'DS:bw_in:GAUGE:600:0:U',
|
'DS:bw_in:COUNTER:600:0:U',
|
||||||
'DS:bw_out:GAUGE:600:0:U',
|
'DS:bw_out:COUNTER:600:0:U',
|
||||||
'DS:bw_total:GAUGE:600:0:U',
|
'DS:bw_total:COUNTER:600:0:U',
|
||||||
);
|
);
|
||||||
|
|
||||||
$fields = array(
|
$fields = array(
|
||||||
|
Reference in New Issue
Block a user