fix: Fix Riverbed optimization polling (#5622)

This commit is contained in:
Søren Rosiak
2017-01-26 23:37:33 +01:00
committed by Neil Lathwood
parent 0dd5f84cca
commit c11e2bfd13
5 changed files with 16 additions and 16 deletions

View File

@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_connections');
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Connections';
$unitlen = 10;
$unitlen = 11;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
@@ -37,14 +37,14 @@ $data_sources = array(
'half_open' => array('descr' => 'Half open','colour' => '66873e',),
'half_closed' => array('descr' => 'Half closed','colour' => 'f49842',),
'established' => array('descr' => 'Established','colour' => '438099',),
'closed' => array('descr' => 'Closed','colour' => 'af2121',),
'active' => array('descr' => 'Active','colour' => 'af2121',),
'total' => array('descr' => 'Total','colour' => '000000',)
);
$i = 0;
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]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;

View File

@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_datastore');
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Datastore';
$unitlen = 10;
$unitlen = 9;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
@@ -42,7 +42,7 @@ $i = 0;
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]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;

View File

@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_optimization');
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Optimized connections';
$unitlen = 10;
$unitlen = 21;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
@@ -41,7 +41,7 @@ $data_sources = array(
$i = 0;
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]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;

View File

@@ -26,7 +26,7 @@ $rrd_filename = rrd_name($device['hostname'], 'riverbed_passthrough');
$scale_min = 0;
$colours = 'mixed';
$unit_text = 'Bandwidth Passthrough';
$unitlen = 10;
$unitlen = 21;
$bigdescrlen = 15;
$smalldescrlen = 15;
$dostack = 0;
@@ -42,7 +42,7 @@ $data_sources = array(
$i = 0;
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]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;

View File

@@ -53,7 +53,7 @@ if ($conn_half_open >= 0 && $conn_half_closed >= 0 && $conn_established >= 0 &&
'half_open' => $conn_half_open,
'half_closed' => $conn_half_closed,
'established' => $conn_established,
'active' => $conn_established,
'active' => $conn_active,
'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.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_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');
data_update($device, 'riverbed_optimisation', $tags, $fields);
$graphs['riverbed_optimisation'] = true;
data_update($device, 'riverbed_optimization', $tags, $fields);
$graphs['riverbed_optimization'] = true;
}
/* 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) {
$rrd_def = array(
'DS:bw_in:GAUGE:600:0:U',
'DS:bw_out:GAUGE:600:0:U',
'DS:bw_total:GAUGE:600:0:U',
'DS:bw_in:COUNTER:600:0:U',
'DS:bw_out:COUNTER:600:0:U',
'DS:bw_total:COUNTER:600:0:U',
);
$fields = array(