Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F5 APM current sessions graphing #9334

Merged
merged 4 commits into from Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions html/includes/graphs/device/bigip_apm_curr_sessions.inc.php
@@ -0,0 +1,19 @@
<?php

$rrd_filename = rrd_name($device['hostname'], 'apm_sessions');

require 'includes/graphs/common.inc.php';

$ds = 'sessions';

$colour_area = '9999cc';
$colour_line = '0000cc';

$colour_area_max = '9999cc';

$graph_max = 1;
$graph_min = 0;

$unit_text = 'Sessions';

require 'includes/graphs/generic_simplex.inc.php';
5 changes: 5 additions & 0 deletions includes/definitions.inc.php
Expand Up @@ -541,6 +541,11 @@
$config['graph_types']['device']['arbos_flows']['order'] = '0';
$config['graph_types']['device']['arbos_flows']['descr'] = 'Accumulative flow count per SP device';

//F5 specific graphs
$config['graph_types']['device']['apm_sessions']['section'] = 'apm';
$config['graph_types']['device']['apm_sessions']['order'] = '0';
$config['graph_types']['device']['apm_sessions']['descr'] = 'Active Sessions';

// Device Types
$i = 0;
$config['device_types'][$i]['text'] = 'Servers';
Expand Down
16 changes: 16 additions & 0 deletions includes/polling/os/f5.inc.php
Expand Up @@ -2,3 +2,19 @@
$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');

if (is_numeric($sessions)) {
$rrd_def = RrdDefinition::make()->addDataset('sessions', 'GAUGE', 0);

$fields = array(
'sessions' => $sessions,
);

$tags = compact('rrd_def');
data_update($device, 'apm_sessions', $tags, $fields);
$graphs['apm_sessions'] = true;
}
1 change: 1 addition & 0 deletions sql-schema/269.sql
@@ -0,0 +1 @@
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'apm_sessions', 'apm', 'Active Sessions', 0);