From a265f9a8dc0014552d5db79e261d4e2527d1c8f4 Mon Sep 17 00:00:00 2001 From: Rosiak Date: Sun, 10 Jan 2016 14:58:56 +0100 Subject: [PATCH] Basic HWGroup Poseidon Discovery Initial PR --- includes/definitions.inc.php | 8 ++++++++ includes/discovery/os/poseidon.inc.php | 17 +++++++++++++++++ includes/polling/os/poseidon.inc.php | 15 +++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 includes/discovery/os/poseidon.inc.php create mode 100644 includes/polling/os/poseidon.inc.php diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 6e8c2aebbc..2ac6b9dcd6 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1415,6 +1415,14 @@ $config['os'][$os]['icon'] = 'ligowave'; $config['os'][$os]['over'][0]['graph'] = 'device_bits'; $config['os'][$os]['over'][0]['text'] = 'Traffic'; ++// HWGroup Poseidon + +$os = 'Poseidon'; + +$config['os'][$os]['text'] = 'Poseidon'; + +$config['os'][$os]['type'] = 'environment'; + +$config['os'][$os]['icon'] = 'generic'; + +$config['os'][$os]['over'][0]['graph'] = 'device_bits'; + +$config['os'][$os]['over'][0]['text'] = 'Traffic'; + // Appliances $os = 'fortios'; $config['os'][$os]['text'] = 'FortiOS'; diff --git a/includes/discovery/os/poseidon.inc.php b/includes/discovery/os/poseidon.inc.php new file mode 100644 index 0000000000..080a3be955 --- /dev/null +++ b/includes/discovery/os/poseidon.inc.php @@ -0,0 +1,17 @@ + + * 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 (strstr($sysObjectId, '.1.3.6.1.4.1.21796.3.3')) { + $os = 'poseidon'; + } +} \ No newline at end of file diff --git a/includes/polling/os/poseidon.inc.php b/includes/polling/os/poseidon.inc.php new file mode 100644 index 0000000000..b5732e1539 --- /dev/null +++ b/includes/polling/os/poseidon.inc.php @@ -0,0 +1,15 @@ + + * 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. + */ + +preg_match_all('/Poseidon [0-9]+|[0-9]+.[0-9]+.[0-9]/', $poll_device['sysDescr'], $matches); +$hardware = $matches[0][0]; +$version = $matches[0][1]; \ No newline at end of file