Fix: F5 LTM bandwidth controller

This commit is contained in:
Yacine BENAMSILI
2020-05-28 23:15:35 +02:00
parent b2d6540ff2
commit fa52264de2
14 changed files with 607 additions and 2 deletions

View File

@@ -55,6 +55,9 @@ class LoadBalancerController implements DeviceTab
$component = new \LibreNMS\Component();
$component_count = $component->getComponentCount($device['device_id']);
if (isset($component_count['f5-ltm-bwc'])) {
$this->tabs[] = 'ltm_bwc';
}
if (isset($component_count['f5-ltm-vs'])) {
$this->tabs[] = 'ltm_vs';
}

View File

@@ -109,6 +109,17 @@ if (!empty($ltmPoolEntry['name'])) {
d_echo("No Pools Found\n");
}
echo "#### Unload disco module ltm-bwc ####\n\n";
$ltmBwcEntry = [];
//Check for Virtual Server Enries
$ltmBwcEntry['name'] = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.2.13.1.3.1.1', 0);
//If no BWC are found don't look for statistics
if (!empty($ltmBwcEntry['name'])) {
d_echo("#### Bandwidth Controller Found\n");
} else {
d_echo("No Bandwidth Controller Found\n");
}
/*
* False == no object found - this is not an error, OID doesn't exist.
* null == timeout or something else that caused an error, OID may exist but we couldn't get it.
@@ -171,6 +182,31 @@ if (!empty($ltmVirtualServEntry) || !empty($ltmPoolEntry) || !empty($ltmPoolMemb
}
}
// Process the BWC
if (is_array($ltmBwcEntry['name'])) {
foreach ($ltmBwcEntry['name'] as $oid => $value) {
$result = array();
// Find all Bandwidth Controller names and UID's, then we can find everything else we need.
if (strpos($oid, '1.3.6.1.4.1.3375.2.2.13.1.3.1.1.') !== false) {
list($null, $index) = explode('1.3.6.1.4.1.3375.2.2.13.1.3.1.1.', $oid);
$result['type'] = 'f5-ltm-bwc';
$result['UID'] = (string)$index;
$result['label'] = $value;
// The UID is far too long to have in a RRD filename, use a hash of it instead.
$result['hash'] = hash('crc32', $result['UID']);
}
// Do we have any results
if (count($result) > 0) {
// Add this result to the master array.
$tblBigIP[] = $result;
}
}
}
// Process the Pools
if (is_array($ltmPoolEntry['name'])) {
foreach ($ltmPoolEntry['name'] as $oid => $value) {

View File

@@ -0,0 +1,52 @@
<?php
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$options = array();
$options['filter']['type'] = array('=','f5-ltm-bwc');
$components = $component->getComponents($device['device_id'], $options);
// We only care about our device id.
$components = $components[$device['device_id']];
include "includes/html/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'LTM Bandwidth Controller Now Avg Max\\n'";
$colours = array_merge(\LibreNMS\Config::get('graph_colours.mixed'), \LibreNMS\Config::get('graph_colours.manycolours'));
$colcount = 0;
$count = 0;
// add all LTM VS on this device.
foreach ($components as $compid => $comp) {
$label = $comp['label'];
$hash = $comp['hash'];
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
if (rrdtool_check_rrd_exists($rrd_filename)) {
// Grab a colour from the array.
if (isset($colours[$colcount])) {
$colour = $colours[$colcount];
} else {
$colcount = 0;
$colour = $colours[$colcount];
}
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":bytesdropped:AVERAGE ";
$rrd_options .= " CDEF:MOD" . $count . "=DS" . $count . ",8,* ";
$rrd_options .= " LINE1.25:MOD" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
$rrd_options .= " GPRINT:MOD" . $count . ":LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:MOD" . $count . ":AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:MOD" . $count . ":MAX:%6.2lf%s\l ";
$count++;
$colcount++;
}
}

View File

@@ -0,0 +1,52 @@
<?php
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$options = array();
$options['filter']['type'] = array('=','f5-ltm-bwc');
$components = $component->getComponents($device['device_id'], $options);
// We only care about our device id.
$components = $components[$device['device_id']];
include "includes/html/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'LTM Bandwidth Controller Now Avg Max\\n'";
$colours = array_merge(\LibreNMS\Config::get('graph_colours.mixed'), \LibreNMS\Config::get('graph_colours.manycolours'));
$colcount = 0;
$count = 0;
// add all LTM VS on this device.
foreach ($components as $compid => $comp) {
$label = $comp['label'];
$hash = $comp['hash'];
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
if (rrdtool_check_rrd_exists($rrd_filename)) {
// Grab a colour from the array.
if (isset($colours[$colcount])) {
$colour = $colours[$colcount];
} else {
$colcount = 0;
$colour = $colours[$colcount];
}
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":bytesin:AVERAGE ";
$rrd_options .= " CDEF:MOD" . $count . "=DS" . $count . ",8,* ";
$rrd_options .= " LINE1.25:MOD" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
$rrd_options .= " GPRINT:MOD" . $count . ":LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:MOD" . $count . ":AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:MOD" . $count . ":MAX:%6.2lf%s\l ";
$count++;
$colcount++;
}
}

View File

@@ -0,0 +1,51 @@
<?php
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$options = array();
$options['filter']['type'] = array('=','f5-ltm-bwc');
$components = $component->getComponents($device['device_id'], $options);
// We only care about our device id.
$components = $components[$device['device_id']];
include "includes/html/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'LTM Bandwidth Controller Now Avg Max\\n'";
$colours = array_merge(\LibreNMS\Config::get('graph_colours.mixed'), \LibreNMS\Config::get('graph_colours.manycolours'));
$colcount = 0;
$count = 0;
// add all LTM VS on this device.
foreach ($components as $compid => $comp) {
$label = $comp['label'];
$hash = $comp['hash'];
$rrd_filename = rrd_name($device['hostname'], array($comp['type'], $label, $hash));
if (rrdtool_check_rrd_exists($rrd_filename)) {
// Grab a colour from the array.
if (isset($colours[$colcount])) {
$colour = $colours[$colcount];
} else {
$colcount = 0;
$colour = $colours[$colcount];
}
$rrd_options .= " DEF:DS" . $count . "=" . $rrd_filename . ":pktsin:AVERAGE ";
$rrd_options .= " LINE1.25:DS" . $count . "#" . $colour . ":'" . str_pad(substr($label, 0, 60), 60) . "'";
$rrd_options .= " GPRINT:DS" . $count . ":LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:DS" . $count . ":AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:DS" . $count . ":MAX:%6.2lf%s\l ";
$count++;
$colcount++;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$options = array();
$options['filter']['type'] = array('=','f5-ltm-bwc');
$components = $component->getComponents($device['device_id'], $options);
// We only care about our device id.
$components = $components[$device['device_id']];
// Is the ID we are looking for a valid LTM VS
if (isset($components[$vars['id']])) {
$label = $components[$vars['id']]['label'];
$hash = $components[$vars['id']]['hash'];
include "includes/html/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'Bits Now Ave Max\\n'";
$rrd_filename = rrd_name($device['hostname'], array('f5-ltm-bwc', $label, $hash));
if (rrdtool_check_rrd_exists($rrd_filename)) {
$rrd_options .= " DEF:INBYTES=" . $rrd_filename . ":bytesin:AVERAGE ";
$rrd_options .= " CDEF:INBITS=INBYTES,8,* ";
$rrd_options .= " LINE1.25:INBITS#008000:'Bits In '";
$rrd_options .= " GPRINT:INBITS:LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:MAX:%6.2lf%s\l ";
}
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$options = array();
$options['filter']['type'] = array('=','f5-ltm-bwc');
$components = $component->getComponents($device['device_id'], $options);
// We only care about our device id.
$components = $components[$device['device_id']];
// Is the ID we are looking for a valid LTM VS
if (isset($components[$vars['id']])) {
$label = $components[$vars['id']]['label'];
$hash = $components[$vars['id']]['hash'];
include "includes/html/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'Bits Now Ave Max\\n'";
$rrd_filename = rrd_name($device['hostname'], array('f5-ltm-bwc', $label, $hash));
if (rrdtool_check_rrd_exists($rrd_filename)) {
$rrd_options .= " DEF:INBYTES=" . $rrd_filename . ":bytesdropped:AVERAGE ";
$rrd_options .= " CDEF:INBITS=INBYTES,8,* ";
$rrd_options .= " LINE1.25:INBITS#CC0000:'Traffic Dropped '";
$rrd_options .= " GPRINT:INBITS:LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:INBITS:MAX:%6.2lf%s\l ";
}
}

View File

@@ -0,0 +1,40 @@
<?php
/*
* LibreNMS module to display F5 LTM Bandwidth Controller Details
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$options = array();
$options['filter']['type'] = array('=','f5-ltm-bwc');
$components = $component->getComponents($device['device_id'], $options);
// We only care about our device id.
$components = $components[$device['device_id']];
// Is the ID we are looking for a valid LTM VS
if (isset($components[$vars['id']])) {
$label = $components[$vars['id']]['label'];
$hash = $components[$vars['id']]['hash'];
include "includes/html/graphs/common.inc.php";
$rrd_options .= " -l 0 -E ";
$rrd_options .= " COMMENT:'Bits Now Ave Max\\n'";
$rrd_filename = rrd_name($device['hostname'], array('f5-ltm-bwc', $label, $hash));
if (rrdtool_check_rrd_exists($rrd_filename)) {
$rrd_options .= " DEF:DS=" . $rrd_filename . ":pktsin:AVERAGE ";
$rrd_options .= " LINE1.25:DS#205F9A:'Packets In '";
$rrd_options .= " GPRINT:DS:LAST:%6.2lf%s ";
$rrd_options .= " GPRINT:DS:AVERAGE:%6.2lf%s ";
$rrd_options .= " GPRINT:DS:MAX:%6.2lf%s\l ";
}
}

View File

@@ -9,6 +9,7 @@ $link_array = array(
$type_text['loadbalancer_rservers'] = 'Rservers'; // Cisco ACE
$type_text['loadbalancer_vservers'] = 'Serverfarms'; // Cisco ACE
$type_text['netscaler_vsvr'] = 'VServers'; // Citrix Netscaler
$type_text['ltm_bwc'] = 'LTM Bandwidth Controller'; // F5 BigIP
$type_text['ltm_vs'] = 'LTM Virtual Servers'; // F5 BigIP
$type_text['ltm_pool'] = 'LTM Pools'; // F5 BigIP
$type_text['gtm_wide'] = 'GTM Wide IPs'; // F5 BigIP

View File

@@ -0,0 +1,37 @@
<?php
/*
* LibreNMS module to Display data from F5 BigIP LTM Devices
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$component = new LibreNMS\Component();
$components = $component->getComponents($device['device_id'], array('filter' => array('ignore' => array('=', 0))));
// We only care about our device id.
$components = $components[$device['device_id']];
// We extracted all the components for this device, now lets only get the LTM ones.
$keep = array();
$types = array($module, 'f5-ltm-bwc');
foreach ($components as $k => $v) {
foreach ($types as $type) {
if ($v['type'] == $type) {
$keep[$k] = $v;
}
}
}
$components = $keep;
$subtype = basename($vars['subtype']);
if (is_file("includes/html/pages/device/loadbalancer/$subtype.inc.php")) {
include "includes/html/pages/device/loadbalancer/$subtype.inc.php";
} else {
include 'includes/html/pages/device/loadbalancer/ltm_bwc_all.inc.php';
}//end if

View File

@@ -0,0 +1,104 @@
<?php
/*
* LibreNMS module to Display data from F5 BigIP LTM Devices
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
?>
<table id='grid' data-toggle='bootgrid' class='table table-condensed table-responsive table-striped'>
<thead>
<tr>
<th data-column-id="bwcid" data-type="numeric" data-visible="false">bwcid</th>
<th data-column-id="name">Name</th>
</tr>
</thead>
<tbody>
<?php
foreach ($components as $bwc_id => $array) {
if ($array['type'] != 'f5-ltm-bwc') {
continue;
}
?>
<tr>
<td><?php echo $bwc_id; ?></td>
<td><?php echo $array['label']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="panel panel-default" id="BitsDropped">
<div class="panel-heading">
<h3 class="panel-title">Traffic Dropped</h3>
</div>
<div class="panel-body">
<?php
$graph_array = array();
$graph_array['device'] = $device['device_id'];
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['legend'] = 'no';
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'device_bigip_ltm_allbwc_BitsDropped';
require 'includes/html/print-graphrow.inc.php';
?>
</div>
</div>
<div class="panel panel-default" id="Bitsin">
<div class="panel-heading">
<h3 class="panel-title">Traffic In</h3>
</div>
<div class="panel-body">
<?php
$graph_array = array();
$graph_array['device'] = $device['device_id'];
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['legend'] = 'no';
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'device_bigip_ltm_allbwc_Bitsin';
require 'includes/html/print-graphrow.inc.php';
?>
</div>
</div>
<div class="panel panel-default" id="pktsin">
<div class="panel-heading">
<h3 class="panel-title">Packets In</h3>
</div>
<div class="panel-body">
<?php
$graph_array = array();
$graph_array['device'] = $device['device_id'];
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['legend'] = 'no';
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'device_bigip_ltm_allbwc_pktsin';
require 'includes/html/print-graphrow.inc.php';
?>
</div>
</div>
<script type="text/javascript">
$("#grid").bootgrid({
caseSensitive: false,
statusMappings: {
2: "danger"
},
}).on("click.rs.jquery.bootgrid", function (e, columns, row) {
var link = '<?php echo generate_url($vars, array('type' => 'ltm_bwc', 'subtype' => 'ltm_bwc_det')); ?>bwcid='+row['bwcid'];
window.location.href = link;
});
</script>

View File

@@ -0,0 +1,43 @@
<?php
/*
* LibreNMS module to Display data from F5 BigIP LTM Devices
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
// Pages
$subtypes = array();
$subtypes['ltm_bwc_det'] = 'Bandwidth Controller Details';
if (!$vars['subtype']) {
$vars['subtype'] = 'ltm_bwc_det';
}
// Determine a policy to show.
if (!isset($vars['bwcid'])) {
foreach ($components as $id => $array) {
if ($array['type'] != 'f5-ltm-bwc') {
continue;
}
$vars['bwcid'] = $id;
}
}
print_optionbar_start();
?>
<div class='row' style="margin-bottom: 10px;">
<div class='col-md-12'>
<span style="font-size: 20px;">Bandwidth Controller - <?php echo $components[$vars['bwcid']]['label'] ?></span><br />
</div>
</div>
<div class='row'>
<div class='col-md-12'>
</div>
</div>
<?php
print_optionbar_end();

View File

@@ -0,0 +1,81 @@
<?php
/*
* LibreNMS module to Display data from F5 BigIP LTM Devices
*
* Copyright (c) 2019 Yacine BENAMSILI <https://github.com/yac01/ yacine.benamsili@homail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
include 'includes/html/pages/device/loadbalancer/ltm_bwc_common.inc.php';
if ($components[$vars['bwcid']]['type'] == 'f5-ltm-bwc') {
?>
<div class="row">
<div class="col-md-12">
<div class="container-fluid">
<div class='row'>
<div class="panel panel-default" id="Bits Dropped">
<div class="panel-heading">
<h3 class="panel-title">Traffic Dropped</h3>
</div>
<div class="panel-body">
<?php
$graph_array = array ();
$graph_array['device'] = $device['device_id'];
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['legend'] = 'no';
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'device_bigip_ltm_bwc_BitsDropped';
$graph_array['id'] = $vars['bwcid'];
require 'includes/html/print-graphrow.inc.php';
?>
</div>
</div>
<div class="panel panel-default" id="Bits">
<div class="panel-heading">
<h3 class="panel-title">Traffic In</h3>
</div>
<div class="panel-body">
<?php
$graph_array = array ();
$graph_array['device'] = $device['device_id'];
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['legend'] = 'no';
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'device_bigip_ltm_bwc_Bits';
$graph_array['id'] = $vars['bwcid'];
require 'includes/html/print-graphrow.inc.php';
?>
</div>
</div>
<div class="panel panel-default" id="pkts">
<div class="panel-heading">
<h3 class="panel-title">Packets In</h3>
</div>
<div class="panel-body">
<?php
$graph_array = array ();
$graph_array['device'] = $device['device_id'];
$graph_array['height'] = '100';
$graph_array['width'] = '215';
$graph_array['legend'] = 'no';
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'device_bigip_ltm_bwc_pkts';
$graph_array['id'] = $vars['bwcid'];
require 'includes/html/print-graphrow.inc.php';
?>
</div>
</div>
</div>
</div>
</div>
<?php
}

View File

@@ -33,7 +33,7 @@ $components = $components[$device['device_id']];
// We extracted all the components for this device, now lets only get the LTM ones.
$keep = array();
$types = array('f5-ltm-vs', 'f5-ltm-pool', 'f5-ltm-poolmember');
$types = array('f5-ltm-vs', 'f5-ltm-bwc', 'f5-ltm-pool', 'f5-ltm-poolmember');
foreach ($components as $k => $v) {
foreach ($types as $type) {
if ($v['type'] == $type) {
@@ -52,6 +52,11 @@ if (count($components > 0)) {
$f5_stats['ltmVirtualServStatEntryBytesout'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.10.2.3.1.9', 0);
$f5_stats['ltmVirtualServStatEntryTotconns'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.10.2.3.1.11', 0);
$f5_stats['ltmBwcEntryPktsin'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.13.1.3.1.7', 0);
$f5_stats['ltmBwcEntryBytesin'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.13.1.3.1.4', 0);
$f5_stats['ltmBwcEntryBytesDropped'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.13.1.3.1.6', 0);
$f5_stats['ltmBwcEntryBytesPassed'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.13.1.3.1.5', 0);
$f5_stats['ltmPoolMemberStatEntryPktsin'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.5.4.3.1.5', 0);
$f5_stats['ltmPoolMemberStatEntryPktsout'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.5.4.3.1.7', 0);
$f5_stats['ltmPoolMemberStatEntryBytesin'] = snmpwalk_array_num($device, '.1.3.6.1.4.1.3375.2.2.5.4.3.1.6', 0);
@@ -79,7 +84,26 @@ if (count($components > 0)) {
$hash = $array['hash'];
$rrd_name = array($type, $label, $hash);
if ($type == 'f5-ltm-vs') {
if ($type == 'f5-ltm-bwc') {
$rrd_def = RrdDefinition::make()
->addDataset('pktsin', 'COUNTER', 0)
->addDataset('bytesin', 'COUNTER', 0)
->addDataset('bytesdropped', 'COUNTER', 0)
->addDataset('bytespassed', 'COUNTER', 0);
$fields = array(
'pktsin' => $f5_stats['ltmBwcEntryPktsin']['1.3.6.1.4.1.3375.2.2.13.1.3.1.7.'.$UID],
'bytesin' => $f5_stats['ltmBwcEntryBytesin']['1.3.6.1.4.1.3375.2.2.13.1.3.1.4.'.$UID],
'bytesdropped' => $f5_stats['ltmBwcEntryBytesDropped']['1.3.6.1.4.1.3375.2.2.13.1.3.1.6.'.$UID],
'bytespassed' => $f5_stats['ltmBwcEntryBytesPassed']['1.3.6.1.4.1.3375.2.2.13.1.3.1.5.'.$UID],
);
// Let's print some debugging info.
d_echo("\n\nComponent: ".$key."\n");
d_echo(" Type: ".$type."\n");
d_echo(" Label: ".$label."\n");
} elseif ($type == 'f5-ltm-vs') {
$rrd_def = RrdDefinition::make()
->addDataset('pktsin', 'COUNTER', 0)
->addDataset('pktsout', 'COUNTER', 0)