Files
librenms-librenms/includes/polling/os/zywall.inc.php
T
Tony MurrayandGitHub 020c5fd7e1 Remove legacy code and fix missing device graphs (#11950)
* removing $graphs global

* remove unused things

* fix some additional graphs

* Fix graphs persisting too soon

* correct name for poller module performance graph

* only one type of graph is used here
2020-07-23 09:57:22 -05:00

21 lines
664 B
PHP

<?php
use LibreNMS\RRD\RrdDefinition;
$hardware = $device['sysDescr'];
$version = explode("ITS", trim(snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.6.0', '-Osqv'), '"'), 2);
$version = $version[0];
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.12.0', '-Oqv'), '"');
$sessions = snmp_get($device, '.1.3.6.1.4.1.890.1.6.22.1.6.0', '-Ovq');
if (is_numeric($sessions)) {
$rrd_def = RrdDefinition::make()->addDataset('sessions', 'GAUGE', 0, 3000000);
$fields = array(
'sessions' => $sessions,
);
$tags = compact('rrd_def');
data_update($device, 'zywall-sessions', $tags, $fields);
$os->enableGraph('zywall_sessions');
}