From d2b74efa002b84c5e78a207f75b010103f6e2661 Mon Sep 17 00:00:00 2001 From: Rosiak Date: Sun, 31 Jul 2016 02:23:19 +0200 Subject: [PATCH] Basic Maipu Mypower Support #3867 --- doc/Support/Features.md | 1 + html/images/os/maipu.png | Bin 0 -> 1741 bytes includes/definitions.inc.php | 12 ++++++++++++ includes/discovery/os/maipu.inc.php | 16 ++++++++++++++++ includes/polling/os/mypoweros.inc.php | 15 +++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 html/images/os/maipu.png create mode 100644 includes/discovery/os/maipu.inc.php create mode 100644 includes/polling/os/mypoweros.inc.php diff --git a/doc/Support/Features.md b/doc/Support/Features.md index 77f67704fe..964dbe10bd 100644 --- a/doc/Support/Features.md +++ b/doc/Support/Features.md @@ -90,6 +90,7 @@ If you are unsure of whether your device is supported or not, feel free to ask u * Liebert * LigoWave * Linux +* Maipu * Mellanox * Meraki * MGE diff --git a/html/images/os/maipu.png b/html/images/os/maipu.png new file mode 100644 index 0000000000000000000000000000000000000000..ceb9ddf3df58c2445c7c5d958c161d3b4e889ba8 GIT binary patch literal 1741 zcmV;;1~U1HP){A7ZLnPgCiga#%g60nF8B`mTa2`e^$M5G|G$PTe#5fQ>7I}mJ;Py`A=h{p;D ziG+w036hCNGalPxyX|(jAN}sGuI{SCqS|G9GBZIjijUNrtGeg@_doyn?`b6>!U;me z#}mQS#>dW~PXqvX=USOJ-nw;?G?*s>;R`SQ`rqs~T%LYp;q;hzZ+V|;ql@GAPX`3R zZr!2p3-xyI^g!STjGRQ?CkBy8*_c|9ikqhcLILNehe*aO;t}g~xOoY|#CQ1cm5>ZTLqYNdZte2XYhGr_80Kn~eTrbp_$|e|2+MvJms&M61`PmqP!!iv>$G|oNCV;ozE3>>=CzFa2i`wBHLn~A& zie(0pG?hTN=do67h98xy9qP97%61*!7qn6c;Q7MExe;D??h>Y<(OR)lZt>dRmMK>|80sTH zC;`JVsJC58l@42bEn1yEre%ac9M@yL++=ntL%q}EW}%Mf3))a9fu83xpU?2h^A8_O z{@P!c>2$r@YIaDU3PC8C$t9^aUCNaYMbea6w|pBYo%rg;$G2q z`tT8=4Bw83Z7`OJ@}HZ#l&TI3lPQ)8^{@llPM=o0&saJ}eyoS@^w@7Wq!SjR4lh-% zv;)Ufirrd=Mze>h7497Xt0OIKA`r0*W^yU6u2g6`J-&8jmRs9Ry8WOfxA)tare-u9 zq1%h2qBct#RpxRj6kwSKZ@*vU+b_RK)G|TAe$BzO4AOCnotksUsqC0fL`;K)$uw72 z_qo1a>@luYy=TU3AGzWISwbMFQ6Emo(CZCOiQslG2AqTiUPgvcmlN(Kt zj9ZlUI~ZCG$`PEe1VjWZ&Fpvr+cfb+c=js`q+&K&YZliky#0QW2j)k3;~%TR-oXrF z9vqgAM~Gx%OpGQ-L=Qc}6Jf2?m=?+G)x6uB_J@e0e(*oF@D0a%7+d^mbA58?sJP>2ZmZ1TvADMC7KksFRN zIhw$>jKJs=Y?hmV;%qiSsnVv|b~$K?>l;d@%)QA&YU+}NlF1B$x4K($hwpB^SQ z5=A5cBEInO0~6s~YCiRavz(vF5U~v&zdXhKWEy}+FOAc3df1lYnJ>@r>9ZNGZ}>cU zc@m{GeNV_F4X#|w(sKGtjmLT7@)ViGhe!X5^P~Lmo1f#IYb8umi~- literal 0 HcmV?d00001 diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index a24a2d10a6..cb3a79e32f 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -140,6 +140,18 @@ $config['os'][$os]['over'][1]['text'] = 'Processor Usage'; $config['os'][$os]['over'][2]['graph'] = 'device_mempool'; $config['os'][$os]['over'][2]['text'] = 'Memory Usage'; +$os = 'mypoweros'; +$config['os'][$os]['text'] = 'Maipu MyPower'; +$config['os'][$os]['type'] = 'network'; +$config['os'][$os]['icon'] = 'maipu'; +$config['os'][$os]['ifname'] = 1; +$config['os'][$os]['over'][0]['graph'] = 'device_bits'; +$config['os'][$os]['over'][0]['text'] = 'Device Traffic'; +$config['os'][$os]['over'][1]['graph'] = 'device_processor'; +$config['os'][$os]['over'][1]['text'] = 'Processor Usage'; +$config['os'][$os]['over'][2]['graph'] = 'device_mempool'; +$config['os'][$os]['over'][2]['text'] = 'Memory Usage'; + // Time server $os = 'microsemitime'; $config['os'][$os]['text'] = 'Microsemi Timing'; diff --git a/includes/discovery/os/maipu.inc.php b/includes/discovery/os/maipu.inc.php new file mode 100644 index 0000000000..b45a479a0c --- /dev/null +++ b/includes/discovery/os/maipu.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 (strpos($sysObjectId, '.1.3.6.1.4.1.5651.1.102.21') !== false) { + $os = 'mypoweros'; + } +} diff --git a/includes/polling/os/mypoweros.inc.php b/includes/polling/os/mypoweros.inc.php new file mode 100644 index 0000000000..90a58a5aa0 --- /dev/null +++ b/includes/polling/os/mypoweros.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. + */ + +$data = explode(" ",$poll_device['sysDescr']); +$hardware = $data['6']; +$version = str_replace("", ",", $data['8']);