From c652cb652e9db5be3bad4978b9cd67369dce0c01 Mon Sep 17 00:00:00 2001 From: laf Date: Tue, 11 Aug 2015 12:32:54 +0000 Subject: [PATCH 1/3] Added serial,version, cpu and mem for zywall --- includes/discovery/mempools/zywall.inc.php | 22 +++++++++++++++++++ includes/discovery/processors/zywall.inc.php | 23 ++++++++++++++++++++ includes/polling/os/zywall.inc.php | 3 +++ 3 files changed, 48 insertions(+) create mode 100644 includes/discovery/mempools/zywall.inc.php create mode 100644 includes/discovery/processors/zywall.inc.php diff --git a/includes/discovery/mempools/zywall.inc.php b/includes/discovery/mempools/zywall.inc.php new file mode 100644 index 0000000000..ad220d853f --- /dev/null +++ b/includes/discovery/mempools/zywall.inc.php @@ -0,0 +1,22 @@ + + * + * 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'] == 'zywall') { + echo 'Zywall mempool: '; + $oid = '.1.3.6.1.4.1.890.1.6.22.1.2.0'; + $usage = snmp_get($device,$oid, '-Ovq'); + if (is_numeric($usage)) { + discover_mempool($valid_mempool, $device, 10, 'zywall', 'Memory', '1', null, null); + } +} diff --git a/includes/discovery/processors/zywall.inc.php b/includes/discovery/processors/zywall.inc.php new file mode 100644 index 0000000000..045e9f512d --- /dev/null +++ b/includes/discovery/processors/zywall.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'] == 'zywall') { + echo 'Zywall Processors: '; + $descr = 'Processor'; + $oid = '.1.3.6.1.4.1.890.1.6.22.1.1.0'; + $usage = snmp_get($device, $oid, '-OQUvs'); + if (is_numeric($usage)) { + discover_processor($valid['processor'], $device, $oid, '0', 'zywall', $descr, 1, $usage, null, null); + } +} diff --git a/includes/polling/os/zywall.inc.php b/includes/polling/os/zywall.inc.php index 9b67f5f78b..ad834f634c 100644 --- a/includes/polling/os/zywall.inc.php +++ b/includes/polling/os/zywall.inc.php @@ -1,3 +1,6 @@ Date: Tue, 11 Aug 2015 20:11:04 +0000 Subject: [PATCH 2/3] updated firmware to version --- includes/polling/os/zywall.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/os/zywall.inc.php b/includes/polling/os/zywall.inc.php index ad834f634c..dbf822e6ff 100644 --- a/includes/polling/os/zywall.inc.php +++ b/includes/polling/os/zywall.inc.php @@ -2,5 +2,5 @@ $hardware = $poll_device['sysDescr']; -$firmware = snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.6.0', '-Osqv'); +$version = snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.6.0', '-Osqv'); $serial = snmp_get($device, '1.3.6.1.4.1.890.1.15.3.1.12.0', '-Osqv'); From 936fb32a9ed48e6fc03642ee370c64affe339eb2 Mon Sep 17 00:00:00 2001 From: laf Date: Tue, 11 Aug 2015 20:20:02 +0000 Subject: [PATCH 3/3] Used oid instead of static --- includes/discovery/mempools/zywall.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/mempools/zywall.inc.php b/includes/discovery/mempools/zywall.inc.php index ad220d853f..94a506fd83 100644 --- a/includes/discovery/mempools/zywall.inc.php +++ b/includes/discovery/mempools/zywall.inc.php @@ -17,6 +17,6 @@ if ($device['os'] == 'zywall') { $oid = '.1.3.6.1.4.1.890.1.6.22.1.2.0'; $usage = snmp_get($device,$oid, '-Ovq'); if (is_numeric($usage)) { - discover_mempool($valid_mempool, $device, 10, 'zywall', 'Memory', '1', null, null); + discover_mempool($valid_mempool, $device, $oid, 'zywall', 'Memory', '1', null, null); } }