mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Update f5.inc.php RRD file needs to be named bigip_apm_sessions for the graph to automatically appear. * Update and rename bigip_apm_curr_sessions.inc.php to bigip_apm_sessions.inc.php It seems that both this file and the RRD file need to be named bigip_apm_sessions for the graphs to appear automatically * Create 270.sql Missed this from the original pull request - the graph has to be named bigip_apm_sessions to automatically display
21 lines
690 B
PHP
21 lines
690 B
PHP
<?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');
|
|
|
|
if (is_numeric($sessions)) {
|
|
$rrd_def = RrdDefinition::make()->addDataset('sessions', 'GAUGE', 0);
|
|
|
|
$fields = array(
|
|
'sessions' => $sessions,
|
|
);
|
|
|
|
$tags = compact('rrd_def');
|
|
data_update($device, 'bigip_apm_sessions', $tags, $fields);
|
|
$graphs['bigip_apm_sessions'] = true;
|
|
}
|