mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
@@ -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;
|
||||
|
||||
@@ -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']))
|
||||
|
||||
@@ -15,6 +15,7 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
|
||||
$current = snmp_get($device, $freq_oid, "-Oqv") / 10;
|
||||
$type = "rfc1628";
|
||||
$divisor = 10;
|
||||
if ($device['os'] == "huaweiups") { $divisor = 100; };
|
||||
$index = '3.2.0.'.$i;
|
||||
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||
}
|
||||
@@ -24,6 +25,7 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
|
||||
$current = snmp_get($device, $freq_oid, "-Oqv") / 10;
|
||||
$type = "rfc1628";
|
||||
$divisor = 10;
|
||||
if ($device['os'] == "huaweiups") { $divisor = 100; };
|
||||
$index = '4.2.0';
|
||||
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||
|
||||
@@ -32,6 +34,7 @@ if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modul
|
||||
$current = snmp_get($device, $freq_oid, "-Oqv") / 10;
|
||||
$type = "rfc1628";
|
||||
$divisor = 10;
|
||||
if ($device['os'] == "huaweiups") { $divisor = 100; };
|
||||
$index = '5.1.0';
|
||||
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,6 +3,7 @@
|
||||
if (!$os)
|
||||
{
|
||||
if (preg_match("/^NetMan.*plus/", $sysDescr)) { $os = "netmanplus"; }
|
||||
if (strstr($sysObjectId, ".1.3.6.1.4.1.5491.6")) { $os = "netmanplus"; }
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user