Pretty sure I followed everything in the docs for creating a custom graph, but I’m seeing nothing. I want to add a graph for total current APM connections on an F5 which is apmAccessStatCurrentActiveSessions.0 in the F5-BIGIP-APM-MIB. Where do I start troubleshooting this?
In mysql I have:
| device | apm_sessions | system | Active Sessions | 0 |
I added to the bottom of config.php:
// F5 APM graphs
$config[‘graph_types’][‘device’][‘apm_sessions’][‘section’] = ‘system’;
$config[‘graph_types’][‘device’][‘apm_sessions’][‘order’] = ‘0’;
$config[‘graph_types’][‘device’][‘apm_sessions’][‘descr’] = ‘Active Sessions’;
I created includes/polling/os/f5_apm.inc.php :
Preformatted text
<?php
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;
}Preformatted text
and html/includes/graphs/device/apm_sessions.inc.php:
Preformatted text
<?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’;Preformatted text