. * * @link https://www.librenms.org * * @copyright 2020 Daniel Baeza * @author Daniel Baeza */ namespace LibreNMS\OS; use App\Models\Device; use LibreNMS\Interfaces\Discovery\OSDiscovery; use LibreNMS\OS; class Qnap extends OS implements OSDiscovery { public function discoverOS(Device $device): void { $info = snmp_getnext_multi($this->getDeviceArray(), ['enclosureModel', 'enclosureSerialNum', 'entPhysicalFirmwareRev'], '-OQUs', 'NAS-MIB:ENTITY-MIB'); $device->version = trim($info['entPhysicalFirmwareRev'] ?? '', '\"'); $device->hardware = $info['enclosureModel']; $device->serial = $info['enclosureSerialNum']; } }