From 545c56dd583dc571db83d6cdb443718f09f937a5 Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Wed, 7 Aug 2024 16:09:29 +1000 Subject: [PATCH] Zyxel serials and correct model, not type, populated. --- app/Helpers/snmp_890_helper.php | 64 ++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/app/Helpers/snmp_890_helper.php b/app/Helpers/snmp_890_helper.php index b24341246..9a5089f18 100644 --- a/app/Helpers/snmp_890_helper.php +++ b/app/Helpers/snmp_890_helper.php @@ -9,6 +9,68 @@ $get_oid_details = function ($ip, $credentials, $oid) { $details = new \StdClass(); $details->manufacturer = 'Zyxel Communications Corp.'; - $details->type = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.2.11.1.1.1.0"); + $details->model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.2.11.1.1.1.0"); + + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.15.3.82.2.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.55.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.18.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.19.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.16.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.15.3.1.12.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.59.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.60.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.56.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.21.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.27.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.73.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.53.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.23.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.72.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.12.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.20.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.68.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.12.47.1.10.0"); + } + if (empty($details->serial)) { + $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.5.8.46.1.10.0"); + } + return($details); };