From 657ee386e0f607d47c3ac3365353b57b2bc31909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Rosiak?= Date: Fri, 2 Sep 2016 21:02:01 +0300 Subject: [PATCH] newdevice: Added support for PLANET Networking & Communication switches (#4308) --- html/images/os/planet.png | Bin 0 -> 2465 bytes includes/definitions.inc.php | 12 ++++++++++++ includes/discovery/os/planetos.inc.php | 17 +++++++++++++++++ includes/polling/os/planetos.inc.php | 15 +++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 html/images/os/planet.png create mode 100644 includes/discovery/os/planetos.inc.php create mode 100644 includes/polling/os/planetos.inc.php diff --git a/html/images/os/planet.png b/html/images/os/planet.png new file mode 100644 index 0000000000000000000000000000000000000000..edf53beca2a18dc2224f1e95e59a4157564d6f96 GIT binary patch literal 2465 zcmV;S310SzP)WFU8GbZ8()Nlj2>E@cM*00{+2L_t(o!?l-ta8%VD z$3N#jckga?H~Y*RNCGC|tso3iv5KS$f>^BrzUs)(s>M2L#ZDbXtpi#|+KP5`oc0f` zwxia^v{SXT6a)bcg81MOBZMTFcXpHA?CajsKX{BZ2@gB{&3xyax%YSH_nF`Co^yT& z&d|=Os^)C1H|3m>pWs`V&x*RIPAYd-jTvqE`~_;aaI>dZ&y1^?F}U#ZrK#)B7rEoU zQc8q4br|h*0jErwz^+d|1z`4!Srz3$IX;)m&MENw&b3_XG_nJQ9wjBm`>Zd=x>`O8 z_P(>@aLd;pl$FLl7eXY25T^wh5u#>HHIZ19&D*wu9`fIC`T18_MrvtZsB@*ajHDi= z!}gLm(uOzPDkeq})zdxs>S(_II@x`sEA6iSi*)3lgd#QwA?WRMC=4iP4pCh>nrTyO zdGWQkiIz>SyY}L;UkvtlE2f9YbK*mZL?Dqu$4pBeotNOAYYzcB zPF{k{kjX{m-qty5w(LId0awAN_VOzyo)l|Hk;+Od7*jFPy0EtJk(Q?YQ#ZL6le+ZB zpl3mGK-WMwkjI2>A~h3C9ox3)@y`HP1jn%vQo)f0xXd0AEo`{IsJLPN@+&8D*L`bG z4bjrt%&1~@fm=!bVB_Fa(sOTuR2L`$3s}3kOpoYtT1NwAUH`Jq2owMcP5Cp_R-y~aFze@iksx} z5^Tsx!RVM(21JHk9fdAqy5Mn_Gr7#5-=WYwt!VI}L0f{>uO{wtt4bkt2y6zEHlpLrWOF@@gd zcDmy_U2y|D>!3-na}v{~Q5c5WI-hyVt+$4UJv%}n%e4GOpjzMzfU2BglRZ8U=uInN zoY)35ud7(U?Ox zltcF$*aKyQhkDhHVIhvRw123%lJdJg$*wLp0W)_}5#%@L5^}1_3eIbid+X(IZnEt$jrs;$u zIz=%-VK|Fsxsf7*UJxXmDdO{H{l!zBqJMjH*F&0_W8v6tqNa-?kD$V>QtVbKIW`_w z%q=K4@)RdJ*t&fiJ!v<>X9M zSI(lbX)Bwyzq@nuzi<5KMRUCuA4x=MP3pKbabl4iCwGpv(l}_03iv2)Pm_)(35H53 zDshNK(r6wxQjMW#Arvc0Pr}RYrt}>!Ujp2|?1Gas(b%;0M3+9$pSUC0-%WjWGsQk1 zK2srVLD*7=Sb{=J5OyhqJQ~&I7I`~IJfl%w5g=9~2t{(J9uKG`C~6qt3WFBpgPpl; zx8IfgGr(_N-ZFAIDvKwu@cXOw?cSZa%W~~vL3KAVuMeN86LxEaJqE>oi;|$1(Zw!0 z8V|GMl}8D?n+TVC35GIQUL8e^Ahbe+8ALHcY~9hH`MNE+gqC{Ny|kH?OD;Hlk69GD zw_wA@nNL?&_uQas^WZ9FQSPC-QY945qk2v9MCnTf=t~CD-Mz|tZ5`ShTN*Ndeg5%}vel z)AZQNIY$6iuYHZ8s$y1LJ&XUz9(w$l;U1en0pPElc$I&}s@FZ&to};l|7~;U)}OKO fW6!>Q#=idnpz~c;fzBIP00000NkvXXu0mjfKH#c3 literal 0 HcmV?d00001 diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 7d995e1978..f8a2f9a74d 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -2064,6 +2064,18 @@ $config['os'][$os]['over'][1]['text'] = 'CPU Usage'; $config['os'][$os]['over'][2]['graph'] = 'device_mempool'; $config['os'][$os]['over'][2]['text'] = 'Memory Usage'; +// PLANET Networking & Communication Switch +$os = 'planetos'; +$config['os'][$os]['text'] = 'PLANET'; +$config['os'][$os]['type'] = 'network'; +$config['os'][$os]['icon'] = 'planet'; +$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'] = 'CPU Usage'; +$config['os'][$os]['over'][2]['graph'] = 'device_mempool'; +$config['os'][$os]['over'][2]['text'] = 'Memory Usage'; + // Graph Types require_once $config['install_dir'].'/includes/load_db_graph_types.inc.php'; diff --git a/includes/discovery/os/planetos.inc.php b/includes/discovery/os/planetos.inc.php new file mode 100644 index 0000000000..e71c1e51ee --- /dev/null +++ b/includes/discovery/os/planetos.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 (str_contains($sysObjectId, '1.3.6.1.4.1.10456.1.1516')) { + $os = 'planetos'; + } +} diff --git a/includes/polling/os/planetos.inc.php b/includes/polling/os/planetos.inc.php new file mode 100644 index 0000000000..ed40fca514 --- /dev/null +++ b/includes/polling/os/planetos.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[0]; +$version = $data[9];