IBM NOS Support

Basic device support for a few IBM NOS devices.
Will add more as i get access to more devices.
This commit is contained in:
Rosiak
2015-02-14 13:18:00 +01:00
parent 555ae09e52
commit 92422461f2
4 changed files with 81 additions and 0 deletions

BIN
html/images/os/ibmnos.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

View File

@@ -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";

View File

@@ -0,0 +1,25 @@
<?php
/*
* LibreNMS IBM NOS information module
*
* Copyright (c) 2015 Søren Friis Rosiak <sorenrosiak@gmail.com>
* 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";
}
}
?>

View File

@@ -0,0 +1,49 @@
<?php
/*
* LibreNMS IBM NOS information module
*
* Copyright (c) 2015 Søren Friis Rosiak <sorenrosiak@gmail.com>
* 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") , '" ');
}
?>