mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added F5 ssl tps, global server/client connection rate and active connections (#9883)
* Added ssl tps, global server/client connection rate and active connections * Added ssl tps, global server/client connection rate and active connections * Added ssl tps, global server/client connection rate and active connections * Added ssl tps, global server/client connection rate and active connections * Moved from 2x snmp_get to snmp_get_multi for SSL TPS * Rewrite of polling module for f5. Thanks to @PipoCanaja for code examples. * Moved files to includes/html/ * changed array definition
This commit is contained in:
@@ -524,6 +524,11 @@ $config['graph_types']['device']['arbos_flows'] = ['section' => 'graphs', 'order
|
||||
|
||||
//F5 specific graphs
|
||||
$config['graph_types']['device']['bigip_apm_sessions'] = ['section' => 'apm', 'order' => 0, 'descr' => 'Active Sessions'];
|
||||
$config['graph_types']['device']['bigip_system_tps'] = ['section' => 'ltm', 'order' => 0, 'descr' => 'SSL Transactions'];
|
||||
$config['graph_types']['device']['bigip_system_server_concurrent_connections'] = ['section' => 'ltm', 'order' => 1, 'descr' => 'Global Server Concurrent Connections'];
|
||||
$config['graph_types']['device']['bigip_system_client_concurrent_connections'] = ['section' => 'ltm', 'order' => 2, 'descr' => 'Global Client Concurrent Connections'];
|
||||
$config['graph_types']['device']['bigip_system_server_connection_rate'] = ['section' => 'ltm', 'order' => 3, 'descr' => 'Global Server Connection Rate'];
|
||||
$config['graph_types']['device']['bigip_system_client_connection_rate'] = ['section' => 'ltm', 'order' => 4, 'descr' => 'Global Client Connection Rate'];
|
||||
|
||||
// Bluecoat ProxySG Graphs
|
||||
$config['graph_types']['device']['sgos_average_requests'] = ['section' => 'network', 'order' => 0, 'descr' => 'Average HTTP Requests'];
|
||||
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'bigip_system_client_concurrent_connections');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ds = 'ClientCurConns';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Active connections';
|
||||
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'bigip_system_client_connection_rate');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ds = 'ClientTotConns';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Connection Rate';
|
||||
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'bigip_system_server_concurrent_connections');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ds = 'ServerCurConns';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Active connections';
|
||||
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'bigip_system_server_connection_rate');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ds = 'ServerTotConns';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Connection Rate';
|
||||
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
25
includes/html/graphs/device/bigip_system_tps.inc.php
Normal file
25
includes/html/graphs/device/bigip_system_tps.inc.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$scale_min = '0';
|
||||
$descr = rrdtool_escape('SSL TPS');
|
||||
$rrd = rrd_name($device['hostname'], 'bigip_system_tps');
|
||||
if (rrdtool_check_rrd_exists($rrd)) {
|
||||
$rrd_options .= ' DEF:a="'.$rrd.'":"TotNativeConns":AVERAGE';
|
||||
$rrd_options .= ' DEF:b="'.$rrd.'":"TotCompatConns":AVERAGE';
|
||||
$rrd_options .= ' CDEF:cdefi="a,b,-"';
|
||||
$rrd_options .= ' LINE2:a#002A97FF:"Native"';
|
||||
$rrd_options .= ' GPRINT:a:LAST:" Last\:%8.2lf %s"';
|
||||
$rrd_options .= ' GPRINT:a:AVERAGE:"Avg\:%8.2lf %s"';
|
||||
$rrd_options .= ' GPRINT:a:MAX:"Max\:%8.2lf %s\n"';
|
||||
$rrd_options .= ' LINE2:b#4444FFFF:"Compat"';
|
||||
$rrd_options .= ' GPRINT:b:LAST:" Last\:%8.2lf %s"';
|
||||
$rrd_options .= ' GPRINT:b:AVERAGE:"Avg\:%8.2lf %s"';
|
||||
$rrd_options .= ' GPRINT:b:MAX:"Max\:%8.2lf %s\n"';
|
||||
$rrd_options .= ' AREA:cdefi#C0C0C0FF:"Difference"';
|
||||
$rrd_options .= ' GPRINT:cdefi:LAST:"Last\:%8.2lf %s"';
|
||||
$rrd_options .= ' GPRINT:cdefi:AVERAGE:"Avg\:%8.2lf %s"';
|
||||
$rrd_options .= ' GPRINT:cdefi:MAX:"Max\:%8.2lf %s\n"';
|
||||
}
|
@@ -1,20 +1,92 @@
|
||||
<?php
|
||||
$version = trim(snmp_get($device, '.1.3.6.1.4.1.3375.2.1.4.2.0', '-OQv'), '"');
|
||||
$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.3375.2.1.3.5.2.0', '-OQv'), '"');
|
||||
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.3375.2.1.3.3.3.0', '-OQv'), '"');
|
||||
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
$sessions = snmp_get($device, 'apmAccessStatCurrentActiveSessions.0', '-OQv', 'F5-BIGIP-APM-MIB');
|
||||
# retrieving base data for version, hardware and serial
|
||||
$mibs = 'F5-BIGIP-SYSTEM-MIB';
|
||||
$oids = [
|
||||
'sysProductVersion.0',
|
||||
'sysPlatformInfoMarketingName.0',
|
||||
'sysGeneralChassisSerialNum.0',
|
||||
];
|
||||
|
||||
if (is_numeric($sessions)) {
|
||||
$rrd_def = RrdDefinition::make()->addDataset('sessions', 'GAUGE', 0);
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs', $mibs);
|
||||
$version = $data[0]['sysProductVersion'];
|
||||
$hardware = $data[0]['sysPlatformInfoMarketingName'];
|
||||
$serial = $data[0]['sysProductVersion'];
|
||||
unset($data, $oids);
|
||||
|
||||
$fields = array(
|
||||
'sessions' => $sessions,
|
||||
);
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'bigip_apm_sessions', $tags, $fields);
|
||||
$graphs['bigip_apm_sessions'] = true;
|
||||
$oids = [
|
||||
'F5-BIGIP-APM-MIB::apmAccessStatCurrentActiveSessions.0',
|
||||
'F5-BIGIP-SYSTEM-MIB::sysStatClientTotConns.0',
|
||||
'F5-BIGIP-SYSTEM-MIB::sysStatServerTotConns.0',
|
||||
'F5-BIGIP-SYSTEM-MIB::sysStatClientCurConns.0',
|
||||
'F5-BIGIP-SYSTEM-MIB::sysStatServerCurConns.0'
|
||||
];
|
||||
|
||||
$metadata = [
|
||||
'apmAccessStatCurrentActiveSessions' => [
|
||||
'dataset' => 'sessions',
|
||||
'type' => 'GAUGE',
|
||||
'name' => 'bigip_apm_sessions'
|
||||
],
|
||||
'sysStatClientTotConns' => [
|
||||
'dataset' => 'ClientTotConns',
|
||||
'type' => 'COUNTER',
|
||||
'name' => 'bigip_system_client_connection_rate'
|
||||
],
|
||||
'sysStatServerTotConns' => [
|
||||
'dataset' => 'ServerTotConns',
|
||||
'type' => 'COUNTER',
|
||||
'name' => 'bigip_system_server_connection_rate'
|
||||
],
|
||||
'sysStatClientCurConns' => [
|
||||
'dataset' => 'ClientCurConns',
|
||||
'type' => 'GAUGE',
|
||||
'name' => 'bigip_system_client_concurrent_connections'
|
||||
],
|
||||
'sysStatServerCurConns' => [
|
||||
'dataset' => 'ServerCurConns',
|
||||
'type' => 'GAUGE',
|
||||
'name' => 'bigip_system_server_concurrent_connections'
|
||||
],
|
||||
];
|
||||
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs');
|
||||
|
||||
foreach ($metadata as $key => $info) {
|
||||
$value = $data[0][$key];
|
||||
if (is_numeric($value)) {
|
||||
$rrd_def = RrdDefinition::make()->addDataset($info['dataset'], $info['type'], 0);
|
||||
$fields = [
|
||||
$info['dataset'] => $value,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, $info['name'], $tags, $fields);
|
||||
$graphs[$info['name']] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# SSL TPS
|
||||
$oids = [
|
||||
'F5-BIGIP-SYSTEM-MIB::sysClientsslStatTotNativeConns.0',
|
||||
'F5-BIGIP-SYSTEM-MIB::sysClientsslStatTotCompatConns.0',
|
||||
];
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs');
|
||||
|
||||
if (is_numeric($data[0]['sysClientsslStatTotNativeConns']) && is_numeric($data[0]['sysClientsslStatTotCompatConns'])) {
|
||||
$rrd_def = RrdDefinition::make()
|
||||
->addDataset('TotNativeConns', 'COUNTER', 0)
|
||||
->addDataset('TotCompatConns', 'COUNTER', 0);
|
||||
$fields = array(
|
||||
'TotNativeConns' => $data[0]['sysClientsslStatTotNativeConns'],
|
||||
'TotCompatConns' => $data[0]['sysClientsslStatTotCompatConns'],
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'bigip_system_tps', $tags, $fields);
|
||||
$graphs['bigip_system_tps'] = true;
|
||||
}
|
||||
|
||||
|
||||
unset($data, $oids, $metadata);
|
||||
|
Reference in New Issue
Block a user