. * * @package LibreNMS * @link http://librenms.org * @copyright 2020 Tony Murray * @author Tony Murray */ namespace LibreNMS\OS; use LibreNMS\Interfaces\Polling\OSPolling; use LibreNMS\RRD\RrdDefinition; class Secureplatform extends \LibreNMS\OS implements OSPolling { public function pollOS() { $connections = snmp_get($this->getDeviceArray(), 'fwNumConn.0', '-OQv', 'CHECKPOINT-MIB'); if (is_numeric($connections)) { $rrd_def = RrdDefinition::make()->addDataset('NumConn', 'GAUGE', 0); $fields = [ 'NumConn' => $connections, ]; $tags = compact('rrd_def'); data_update($this->getDeviceArray(), 'secureplatform_sessions', $tags, $fields); $this->enableGraph('secureplatform_sessions'); } } }