From 016b759858d76ca1db3a5a871f09ba73f64a6f07 Mon Sep 17 00:00:00 2001 From: willjones Date: Mon, 6 Jul 2015 21:17:50 +0100 Subject: [PATCH] Added Meraki OS discovery and polling --- html/images/os/meraki.png | Bin 0 -> 1664 bytes includes/definitions.inc.php | 25 +++++++++++++++++++++++++ includes/discovery/os/merakimr.inc.php | 17 +++++++++++++++++ includes/discovery/os/merakims.inc.php | 17 +++++++++++++++++ includes/discovery/os/merakimx.inc.php | 17 +++++++++++++++++ includes/polling/os/merakimr.inc.php | 18 ++++++++++++++++++ includes/polling/os/merakims.inc.php | 18 ++++++++++++++++++ includes/polling/os/merakimx.inc.php | 18 ++++++++++++++++++ 8 files changed, 130 insertions(+) create mode 100644 html/images/os/meraki.png create mode 100644 includes/discovery/os/merakimr.inc.php create mode 100644 includes/discovery/os/merakims.inc.php create mode 100644 includes/discovery/os/merakimx.inc.php create mode 100644 includes/polling/os/merakimr.inc.php create mode 100644 includes/polling/os/merakims.inc.php create mode 100644 includes/polling/os/merakimx.inc.php diff --git a/html/images/os/meraki.png b/html/images/os/meraki.png new file mode 100644 index 0000000000000000000000000000000000000000..51b3564f6dc9e20b528d3d7933766b418addb6fa GIT binary patch literal 1664 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^T}FfdWk9dNvV1jxdlK~3=B3ERzPNMYDuC(MQ%=Bu~mhw5?F;5kPQ;nS5g2gDap1~ zitr6kaLzAERWQ{v(KAr8<5EyiuqjGOvkG!?gK7uzY?U%fN(!v>^~=l4^~#O)@{7{- z4J|D#^$m>ljf`}GDs+o0^GXscbn}XpA%?)raY-#sF3Kz@$;{7F0GXSZlwVq6tE2?7 z2o50bEXhnm*pycc^%l^B`XCv7Lp=k1xY$-uu4$%|?`(myi^JB2i8yLB{aA6K{@*9Z*Na6&7HV|3F8S{gV8FUGH^67HS+9ht zeUSN*v)xB*e9AuGy89-%tn7OAyEJp_yS<$%6YMPwir=5H{XQrEoaOzU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luCEN|i^zJ|FRf4EtjelDHltuzl*S9rSmxvX $blah) } } +// Meraki +$os = "merakimx"; +$config['os'][$os]['text'] = "Meraki MX Appliance"; +$config['os'][$os]['type'] = "firewall"; +$config['os'][$os]['icon'] = "meraki"; +$config['os'][$os]['ifname'] = 1; +$config['os'][$os]['over'][0]['graph'] = "device_bits"; +$config['os'][$os]['over'][0]['text'] = "Device Traffic"; + +$os = "merakimr"; +$config['os'][$os]['text'] = "Meraki AP"; +$config['os'][$os]['type'] = "wireless"; +$config['os'][$os]['icon'] = "meraki"; +$config['os'][$os]['ifname'] = 1; +$config['os'][$os]['over'][0]['graph'] = "device_bits"; +$config['os'][$os]['over'][0]['text'] = "Device Traffic"; + +$os = "merakims"; +$config['os'][$os]['text'] = "Meraki Switch"; +$config['os'][$os]['type'] = "network"; +$config['os'][$os]['icon'] = "meraki"; +$config['os'][$os]['ifname'] = 1; +$config['os'][$os]['over'][0]['graph'] = "device_bits"; +$config['os'][$os]['over'][0]['text'] = "Device Traffic"; + // Graph Types include_once($config['install_dir'] . "/includes/load_db_graph_types.inc.php"); diff --git a/includes/discovery/os/merakimr.inc.php b/includes/discovery/os/merakimr.inc.php new file mode 100644 index 000000000..a8255a6b3 --- /dev/null +++ b/includes/discovery/os/merakimr.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 (preg_match("/^Meraki MR/", $sysDescr)) { $os = "merakimr"; } +} + +?> diff --git a/includes/discovery/os/merakims.inc.php b/includes/discovery/os/merakims.inc.php new file mode 100644 index 000000000..8635c0e95 --- /dev/null +++ b/includes/discovery/os/merakims.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 (preg_match("/^Meraki MS/", $sysDescr)) { $os = "merakims"; } +} + +?> diff --git a/includes/discovery/os/merakimx.inc.php b/includes/discovery/os/merakimx.inc.php new file mode 100644 index 000000000..aa0f87e91 --- /dev/null +++ b/includes/discovery/os/merakimx.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 (preg_match("/^Meraki MX/", $sysDescr)) { $os = "merakimx"; } +} + +?> diff --git a/includes/polling/os/merakimr.inc.php b/includes/polling/os/merakimr.inc.php new file mode 100644 index 000000000..2158f6c25 --- /dev/null +++ b/includes/polling/os/merakimr.inc.php @@ -0,0 +1,18 @@ + + * 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(empty($hardware)) { + $hardware = snmp_get($device, "sysDescr.0", "-Osqv", "SNMPv2-MIB"); +} + + +?> diff --git a/includes/polling/os/merakims.inc.php b/includes/polling/os/merakims.inc.php new file mode 100644 index 000000000..1bfdaedc3 --- /dev/null +++ b/includes/polling/os/merakims.inc.php @@ -0,0 +1,18 @@ + + * 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(empty($hardware)) { + $hardware = snmp_get($device, "sysDescr.0", "-Osqv", "SNMPv2-MIB"); +} + + +?> diff --git a/includes/polling/os/merakimx.inc.php b/includes/polling/os/merakimx.inc.php new file mode 100644 index 000000000..217ca3afc --- /dev/null +++ b/includes/polling/os/merakimx.inc.php @@ -0,0 +1,18 @@ + + * 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(empty($hardware)) { + $hardware = snmp_get($device, "sysDescr.0", "-Osqv", "SNMPv2-MIB"); +} + + +?>