mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Merge pull request #575 from laf/issue-laf-144
Merged hp and comware poll/disco
This commit is contained in:
@@ -982,12 +982,6 @@ $config['os'][$os]['text'] = "Hikvision";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
$config['os'][$os]['icon'] = "hikvision";
|
||||
|
||||
$os = "hp";
|
||||
$config['os'][$os]['text'] = "HP";
|
||||
$config['os'][$os]['over'][0]['graph'] = "device_bits";
|
||||
$config['os'][$os]['over'][0]['text'] = "Traffic";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
|
||||
foreach ($config['os'] as $this_os => $blah)
|
||||
{
|
||||
if (isset($config['os'][$this_os]['group']))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
if (!$os)
|
||||
{
|
||||
if (strstr($sysDescr, "Comware")) { $os = "comware"; }
|
||||
else if(preg_match('/HP [a-zA-Z0-9-]+ Switch Software Version/',$sysDescr)) { $os = "comware"; }
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if(preg_match('/HP [a-zA-Z0-9-]+ Switch Software Version/',$sysDescr)) { $os = "hp"; }
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -12,5 +12,8 @@ $hardware = snmp_get($device, "sysObjectID.0", "-OQsv", "SNMPv2-MIB:HH3C-PRODUCT
|
||||
list(,$version,$features) = explode(",", $poll_device['sysDescr']);
|
||||
list(,,,$version) = explode(" ", $version);
|
||||
list(,,$features) = explode(" ", $features);
|
||||
if (empty($version)) {
|
||||
list($version) = explode("\r", substr($poll_device['sysDescr'], strpos($poll_device['sysDescr'], "Release")+8));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
# Version is the last word in the sysDescr's first line
|
||||
list($version) = explode("\r", substr($poll_device['sysDescr'], strpos($poll_device['sysDescr'], "Release")+8));
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user