. * * @package LibreNMS * @link https://www.librenms.org * @copyright 2020 Tony Murray * @author Tony Murray */ namespace LibreNMS\OS; use App\Models\Device; class Cumulus extends \LibreNMS\OS { public function discoverOS(Device $device): void { $data = snmp_getnext_multi($this->getDeviceArray(), ['entPhysicalDescr', 'entPhysicalSoftwareRev', 'entPhysicalSerialNum'], '-OQUs', 'ENTITY-MIB'); $device->hardware = $data['entPhysicalDescr']; $device->serial = $data['entPhysicalSerialNum']; $device->version = preg_replace('/^Cumulus Linux /', '', $data['entPhysicalSoftwareRev']); } }