feature: Add Cisco WAAS Optimized TCP Connections Graph (#4645)

* feature: Add Cisco WAAS Optimized TCP Connections Graph

* fix names
This commit is contained in:
Søren Rosiak
2016-09-28 10:00:35 +03:00
committed by Neil Lathwood
parent 6fdcf8a6da
commit f6db0a505a
4 changed files with 39 additions and 0 deletions

View File

@@ -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';

View File

@@ -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';

View File

@@ -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
View 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', '');