. * * @package LibreNMS * @link https://www.librenms.org * @copyright 2020 Tony Murray * @author Tony Murray */ namespace LibreNMS\OS; use LibreNMS\Interfaces\Polling\OSPolling; use LibreNMS\RRD\RrdDefinition; class Procurve extends \LibreNMS\OS implements OSPolling { public function pollOS() { $FdbAddressCount = snmp_get($this->getDeviceArray(), 'hpSwitchFdbAddressCount.0', '-Ovqn', 'STATISTICS-MIB'); if (is_numeric($FdbAddressCount)) { $rrd_def = RrdDefinition::make()->addDataset('value', 'GAUGE', -1, 100000); $fields = [ 'value' => $FdbAddressCount, ]; $tags = compact('rrd_def'); data_update($this->getDeviceArray(), 'fdb_count', $tags, $fields); $this->enableGraph('fdb_count'); } } }