From 92422461f297c2503150aeeae2725e0fb006d9aa Mon Sep 17 00:00:00 2001 From: Rosiak Date: Sat, 14 Feb 2015 13:18:00 +0100 Subject: [PATCH] IBM NOS Support Basic device support for a few IBM NOS devices. Will add more as i get access to more devices. --- html/images/os/ibmnos.png | Bin 0 -> 606 bytes includes/definitions.inc.php | 7 ++++ includes/discovery/os/ibmnos.inc.php | 25 ++++++++++++++ includes/polling/os/ibmnos.inc.php | 49 +++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 html/images/os/ibmnos.png create mode 100644 includes/discovery/os/ibmnos.inc.php create mode 100644 includes/polling/os/ibmnos.inc.php diff --git a/html/images/os/ibmnos.png b/html/images/os/ibmnos.png new file mode 100644 index 0000000000000000000000000000000000000000..4522eef6c216afb9f197622ffd7778fddcb351c8 GIT binary patch literal 606 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyu>n3Iu0T35F)=wUDmIVr!WJm%kL7?(q!+FNIc2S4y@)KvJL+>f8a<1|? zzA-p-PAbECC2xNThAPLG+&yzHa3}xNSZcFaNmW&QQWRfj)#0PpywY1PsPNe=T9=%p z8N?ZxF-ud&GU!b3GUte8Pg@K#ixuOyABsMd@G0vW@771!roPR7LDN6H`m;4G?)WPH zwJ$i=nZ?@f+IzHq;*O6;Y7B1gEEf2!J1^P5hI`kqKffKn@76I2xKQe;y4CAthfKx8 z(!2Zy6P~vnE~>Q;I_4(5GOTUkn`M8EM6;rToRxn+OYSLCTfcngF1yaREA96h9RE># zY{t9#xYgd4S^wge{P|ZT_TenA%~$SI?+#{N0EVAxiEBhjN@7W>RdP`(kYX@0Ff`RQ zFw!+N2{ACXGBU6-HrF*UvobL7&aa$_q9HdwB{QuOw+1VtgQ`Fc44$rjF6*2UngC0A B>A3&^ literal 0 HcmV?d00001 diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 720a6227a..e02f836f0 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -621,6 +621,13 @@ $config['os'][$os]['text'] = "Blade Network Technologies"; $config['os'][$os]['type'] = "network"; $config['os'][$os]['icon'] = "bnt"; +$os = "ibmnos"; +$config['os'][$os]['text'] = "IBM Networking Operating System"; +$config['os'][$os]['type'] = "network"; +$config['os'][$os]['icon'] = "ibmnos"; +$config['os'][$os]['over'][0]['graph'] = "device_bits"; +$config['os'][$os]['over'][0]['text'] = "Traffic"; + $os = "comware"; $config['os'][$os]['text'] = "HP Comware"; $config['os'][$os]['type'] = "network"; diff --git a/includes/discovery/os/ibmnos.inc.php b/includes/discovery/os/ibmnos.inc.php new file mode 100644 index 000000000..615f0c053 --- /dev/null +++ b/includes/discovery/os/ibmnos.inc.php @@ -0,0 +1,25 @@ + +* 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, "IBM Networking Operating System")) + { + $os = "ibmnos"; + } + elseif (stristr($sysDescr, "IBM Flex System Fabric")) + { + $os = "ibmnos"; + } + } + +?> diff --git a/includes/polling/os/ibmnos.inc.php b/includes/polling/os/ibmnos.inc.php new file mode 100644 index 000000000..d2e814e25 --- /dev/null +++ b/includes/polling/os/ibmnos.inc.php @@ -0,0 +1,49 @@ + +* 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. +*/ + +$sysdescr_value = snmp_get($device, "sysDescr.0", "-Ovq"); + +if (strpos($sysdescr_value, 'IBM Networking Operating System') !== false) + { + $hardware = str_replace("IBM Networking Operating System", "", $sysdescr_value); + if (strpos($sysdescr_value, 'G8052') !== false) + { + $version = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.10.1", "-Ovq") , '" '); + $serial = trim(snmp_get($device, ".1.3.6.1.4.1.26543.100.100.14.9.0", "-Ovq") , '" '); + } + + if (strpos($sysdescr_value, 'G8316') !== false) + { + $version = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.10.1", "-Ovq") , '" '); + $serial = trim(snmp_get($device, ".1.3.6.1.4.1.20301.100.100.14.9.0", "-Ovq") , '" '); + } + + if (strpos($sysdescr_value, 'G8264CS') !== false) + { + $version = trim(snmp_get($device, ".1.3.6.1.4.1.20301.2.7.15.1.1.1.10.0", "-Ovq") , '" '); + $serial = trim(snmp_get($device, ".1.3.6.1.4.1.20301.100.100.14.9.0", "-Ovq") , '" '); + } + + if (strpos($sysdescr_value, 'G8264-T') !== false) + { + $version = trim(snmp_get($device, ".1.3.6.1.4.1.20301.2.7.13.1.1.1.10.0", "-Ovq") , '" '); + $serial = trim(snmp_get($device, ".1.3.6.1.4.1.20301.100.100.14.9.0", "-Ovq") , '" '); + } + } +elseif (strpos($sysdescr_value, 'IBM Flex System Fabric') !== false) + { + $hardware = str_replace("IBM Flex System Fabric", "", $sysdescr_value); + $version = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.10.1", "-Ovq") , '" '); + $serial = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.11.1", "-Ovq") , '" '); + } + +?>