mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
001d7d7643
DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926` After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert. While this creates the graphs under Apm for the F5s, there is no data. I can pull the data manually. Maybe I have the definition incorrect in includes/polling/os/f5.inc.php? snmpget -m /opt/librenms/mibs/f5/F5-BIGIP-APM-MIB -v 3 -u <user> -l authPriv -a SHA -A <password> -x AES -X <password> <server> apmAccessStatCurrentActiveSessions.0 F5-BIGIP-APM-MIB::apmAccessStatCurrentActiveSessions.0 = Wrong Type (should be Counter64): Gauge32: 1245 or maybe it's because the OID has the incorrect type in it, although the result is actually correct.
21 lines
678 B
PHP
21 lines
678 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, 'apm_sessions', $tags, $fields);
|
|
$graphs['apm_sessions'] = true;
|
|
}
|