newdevice: removed all references to 'multimatics' and instead added generex OS

This commit is contained in:
barryodonovan
2016-12-21 08:01:01 +00:00
committed by Neil Lathwood
parent 4e436f8a8b
commit 4898617ef5
12 changed files with 53 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -746,9 +746,9 @@ $config['modules_compat']['rfc1628']['liebert'] = 1;
$config['modules_compat']['rfc1628']['netmanplus'] = 1;
$config['modules_compat']['rfc1628']['deltaups'] = 1;
$config['modules_compat']['rfc1628']['poweralert'] = 1;
$config['modules_compat']['rfc1628']['multimatic'] = 1;
$config['modules_compat']['rfc1628']['webpower'] = 1;
$config['modules_compat']['rfc1628']['huaweiups'] = 1;
$config['modules_compat']['rfc1628']['generex-ups'] = 1;
// Enable daily updates
$config['update'] = 1;

View File

@@ -2470,14 +2470,36 @@ $config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$config['os'][$os]['icon'] = 'enterasys';
$config['os'][$os]['ifname'] = 1;
// Multimatic UPS (Generex CS121 SNMP Adapter)
$os = 'multimatic';
$config['os'][$os]['text'] = 'Multimatic UPS';
$config['os'][$os]['type'] = 'power';
$config['os'][$os]['icon'] = 'multimatic';
$config['os'][$os]['poller_modules']['ospf'] = 0;
$config['os'][$os]['poller_modules']['ntp'] = 0;
$config['os'][$os]['poller_modules']['services'] = 0;
// Generex CS121 / CS141 UPS SNMP Adapter
$os = 'generex-ups';
$config['os'][$os]['text'] = 'Generex UPS SNMP adapter';
$config['os'][$os]['type'] = 'power';
$config['os'][$os]['icon'] = 'generex-ups';
$config['os'][$os]['discovery_modules']['storage'] = 0;
$config['os'][$os]['discovery_modules']['bgp-peers'] = 0;
$config['os'][$os]['discovery_modules']['ntp'] = 0;
$config['os'][$os]['discovery_modules']['stp'] = 0;
$config['os'][$os]['discovery_modules']['diskio'] = 0;
$config['os'][$os]['discovery_modules']['vlans'] = 0;
$config['os'][$os]['discovery_modules']['arp-table'] = 0;
$config['os'][$os]['discovery_modules']['discovery-protocols'] = 0;
$config['os'][$os]['discovery_modules']['hr-device'] = 0;
$config['os'][$os]['discovery_modules']['mempools'] = 0;
$config['os'][$os]['discovery_modules']['entity-physical'] = 0;
$config['os'][$os]['discovery_modules']['ports-stack'] = 0;
$config['os'][$os]['discovery_modules']['ucd-diskio'] = 0;
$config['os'][$os]['discovery_modules']['processors'] = 0;
$config['os'][$os]['poller_modules']['ospf'] = 0;
$config['os'][$os]['poller_modules']['ntp'] = 0;
$config['os'][$os]['poller_modules']['services'] = 0;
$config['os'][$os]['poller_modules']['ntp'] = 0;
$config['os'][$os]['poller_modules']['ospf'] = 0;
$config['os'][$os]['poller_modules']['services'] = 0;
$config['os'][$os]['poller_modules']['storage'] = 0;
$config['os'][$os]['over'][0]['graph'] = 'device_voltage';
$config['os'][$os]['over'][0]['text'] = 'Voltage';
$config['os'][$os]['over'][1]['graph'] = 'sensor_voltage';
$config['os'][$os]['over'][1]['text'] = 'Battery Voltage';
// Huawei UPS
$os = 'huaweiups';

View File

@@ -0,0 +1,5 @@
<?php
if (str_contains($sysDescr, array('CS121', 'CS141')) && str_contains($sysObjectId, '.1.3.6.1.2.1.33')) {
$os = 'generex-ups';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'CS121') && str_contains(snmp_get($device, 'UPS-MIB::upsIdentManufacturer.0', '-Oqv', ''), array('Multimatic', 'S2S'))) {
$os = 'multimatic';
}

View File

@@ -0,0 +1,6 @@
<?php
$hardware_array = snmp_get_multi($device, 'upsIdentManufacturer.0 upsIdentModel.0 upsIdentAgentSoftwareVersion.0', '-OQUs', 'UPS-MIB');
d_echo($hardware_array);
$hardware = trim($hardware_array[0]['upsIdentManufacturer'], '"') . ' - ' . trim($hardware_array[0]['upsIdentModel'], '"');
$version = trim($hardware_array[0]['upsIdentAgentSoftwareVersion'], '"');

View File

@@ -1,5 +0,0 @@
<?php
$hardware = snmp_get($device, 'upsIdentModel.0', '-OQv', 'UPS-MIB');
$version = snmp_get($device, 'upsIdentAgentSoftwareVersion.0', '-OQv', 'UPS-MIB');

View File

@@ -614,6 +614,13 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('gamatronicups');
}
public function testGenerexUps()
{
$this->checkOS('generex-ups');
$this->checkOS('generex-ups', 'generex-ups1');
$this->checkOS('generex-ups', 'generex-ups2');
}
public function testHikvision()
{
$this->checkOS('hikvision');
@@ -885,12 +892,6 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('mrvld');
}
public function testMultimatic()
{
$this->checkOS('multimatic');
$this->checkOS('multimatic', 'multimatic1');
}
public function testNetapp()
{
$this->checkOS('netapp');

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|"CS121 v 5.14.50"
1.3.6.1.2.1.1.2.0|4|.1.3.6.1.2.1.33

View File

@@ -1,2 +1,3 @@
1.3.6.1.2.1.1.1.0|4|CS121
1.3.6.1.2.1.1.2.0|4|.1.3.6.1.2.1.33
1.3.6.1.2.1.33.1.1.1.0|4|Multimatic

View File

@@ -1,2 +1,3 @@
1.3.6.1.2.1.1.1.0|4|CS121
1.3.6.1.2.1.1.2.0|4|.1.3.6.1.2.1.33
1.3.6.1.2.1.33.1.1.1.0|4|S2S