From 4338de103af733c37cae9e0b7a3e6a388d5165b0 Mon Sep 17 00:00:00 2001 From: Rosiak Date: Tue, 28 Jul 2015 19:30:08 +0200 Subject: [PATCH] Add Basic Aerohive Support - As stated in the title --- includes/definitions.inc.php | 7 +++++++ includes/discovery/os/aerohive.inc.php | 16 ++++++++++++++++ includes/polling/os/aerohive.inc.php | 14 ++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 includes/discovery/os/aerohive.inc.php create mode 100644 includes/polling/os/aerohive.inc.php diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 62c418707..448e226d3 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1239,6 +1239,13 @@ $config['os'][$os]['ifname'] = 1; $config['os'][$os]['over'][0]['graph'] = 'device_bits'; $config['os'][$os]['over'][0]['text'] = 'Device Traffic'; +// Aerohive +$os = 'aerohive'; +$config['os'][$os]['text'] = 'Aerohive HiveOS'; +$config['os'][$os]['type'] = 'wireless'; +$config['os'][$os]['over'][0]['graph'] = 'device_bits'; +$config['os'][$os]['over'][0]['text'] = 'Traffic'; + // Graph Types require_once $config['install_dir'].'/includes/load_db_graph_types.inc.php'; diff --git a/includes/discovery/os/aerohive.inc.php b/includes/discovery/os/aerohive.inc.php new file mode 100644 index 000000000..79d509ffd --- /dev/null +++ b/includes/discovery/os/aerohive.inc.php @@ -0,0 +1,16 @@ + + * 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 (!$os) { + if (stristr($sysDescr, 'HiveOS')) { + $os = 'aerohive'; + } +} diff --git a/includes/polling/os/aerohive.inc.php b/includes/polling/os/aerohive.inc.php new file mode 100644 index 000000000..8ca9fb8a2 --- /dev/null +++ b/includes/polling/os/aerohive.inc.php @@ -0,0 +1,14 @@ + + * 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 (preg_match('/^(.+?),/', $poll_device['sysDescr'], $hardware) { + $hardware = $store[1]; +}