Support Huawei UPS, tested with UPS5000

This commit is contained in:
sthen
2015-07-04 20:14:28 +01:00
parent 7d6dbe4d9b
commit 69e9929ddb
3 changed files with 22 additions and 0 deletions

View File

@ -575,6 +575,7 @@ $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;
# Enable daily updates
$config['update'] = 1;

View File

@ -1162,6 +1162,15 @@ $config['os'][$os]['text'] = "Multimatic UPS";
$config['os'][$os]['type'] = "power";
$config['os'][$os]['icon'] = "multimatic";
// Huawei UPS
$os = "huaweiups";
$config['os'][$os]['text'] = "Huawei UPS";
$config['os'][$os]['group'] = "ups";
$config['os'][$os]['type'] = "power";
$config['os'][$os]['icon'] = "huawei";
$config['os'][$os]['over'][0]['graph'] = "device_current";
$config['os'][$os]['over'][0]['text'] = "Current";
foreach ($config['os'] as $this_os => $blah)
{
if (isset($config['os'][$this_os]['group']))

View File

@ -0,0 +1,12 @@
<?php
if (!$os)
{
if (preg_match("/^Linux GSE200M/", $sysDescr)) {
if (strstr(snmp_get($device, "UPS-MIB::upsIdentManufacturer.0", "-Oqv", ""), "HUAWEI")){
$os = "huaweiups";
}
}
}
?>