. * * @package LibreNMS * @link https://www.librenms.org * @copyright 2020 Tony Murray * @author Tony Murray */ namespace LibreNMS\OS; use LibreNMS\Interfaces\Data\DataStorageInterface; use LibreNMS\Interfaces\Polling\OSPolling; use LibreNMS\RRD\RrdDefinition; class Pulse extends \LibreNMS\OS implements OSPolling { public function pollOS(DataStorageInterface $datastore): void { $users = snmp_get($this->getDeviceArray(), 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB'); if (is_numeric($users)) { $rrd_def = RrdDefinition::make()->addDataset('users', 'GAUGE', 0); $fields = [ 'users' => $users, ]; $tags = compact('rrd_def'); $datastore->put($this->getDeviceArray(), 'pulse_users', $tags, $fields); $this->enableGraph('pulse_users'); } } }