mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Add Cisco WAAS Optimized TCP Connections Graph (#4645)
* feature: Add Cisco WAAS Optimized TCP Connections Graph * fix names
This commit is contained in:
committed by
Neil Lathwood
parent
6fdcf8a6da
commit
f6db0a505a
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'waas_cwotfostatsactiveoptconn');
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$ds = 'connections';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Optimized TCP Connections';
|
||||
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
@@ -2480,6 +2480,11 @@ $config['graph_types']['device']['ib_dhcp_messages']['section'] =
|
||||
$config['graph_types']['device']['ib_dhcp_messages']['order'] = '0';
|
||||
$config['graph_types']['device']['ib_dhcp_messages']['descr'] = 'DHCP messages';
|
||||
|
||||
// Cisco WAAS Optimized TCP Connections
|
||||
$config['graph_types']['device']['waas_cwotfostatsactiveoptconn']['section'] = 'graphs';
|
||||
$config['graph_types']['device']['waas_cwotfostatsactiveoptconn']['order'] = '0';
|
||||
$config['graph_types']['device']['waas_cwotfostatsactiveoptconn']['descr'] = 'Optimized TCP Connections';
|
||||
|
||||
$config['graph_types']['device']['bits']['section'] = 'netstats';
|
||||
$config['graph_types']['device']['bits']['order'] = '0';
|
||||
$config['graph_types']['device']['bits']['descr'] = 'Total Traffic';
|
||||
|
@@ -23,3 +23,17 @@ if ($data[1]['entPhysicalContainedIn'] == '0') {
|
||||
$serial = $data[1]['entPhysicalSerialNum'];
|
||||
}
|
||||
}
|
||||
|
||||
$connections = snmp_get($device, 'CISCO-WAN-OPTIMIZATION-MIB::cwoTfoStatsActiveOptConn.0', '-OQv');
|
||||
|
||||
if (is_numeric($connections)) {
|
||||
$rrd_def = 'DS:connections:GAUGE:600:0:U';
|
||||
|
||||
$fields = array(
|
||||
'connections' => $connections
|
||||
);
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'waas_cwotfostatsactiveoptconn', $tags, $fields);
|
||||
$graphs['waas_cwotfostatsactiveoptconn'] = true;
|
||||
}
|
||||
|
1
sql-schema/140.sql
Normal file
1
sql-schema/140.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'waas_cwotfostatsactiveoptconn', 'graphs', 'Optimized TCP Connections', '');
|
Reference in New Issue
Block a user