From 7c01b6bb7bbae7fc0259374f00644149ffce6d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Rosiak?= Date: Thu, 22 Dec 2016 04:39:58 +0200 Subject: [PATCH] newdevice: Added CPU detection for Zyxel GS2200-24 (#5218) --- includes/discovery/processors/zyxel.inc.php | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 includes/discovery/processors/zyxel.inc.php diff --git a/includes/discovery/processors/zyxel.inc.php b/includes/discovery/processors/zyxel.inc.php new file mode 100644 index 0000000000..4965fd5512 --- /dev/null +++ b/includes/discovery/processors/zyxel.inc.php @@ -0,0 +1,23 @@ + + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os'] == 'zyxel') { + echo 'Zyxel : '; + + $oid = '.1.3.6.1.4.1.890.1.5.8.55.12.7.0'; + $descr = 'Processor'; + $usage = snmp_get($device, $oid, '-Ovqn'); + + if (is_numeric($usage)) { + discover_processor($valid['processor'], $device, $oid, '0', 'zyxel', $descr, '1', $usage); + } +}