Merge pull request #575 from laf/issue-laf-144

Merged hp and comware poll/disco
This commit is contained in:
Paul Gear
2015-03-10 10:46:05 +10:00
5 changed files with 4 additions and 20 deletions
-6
View File
@@ -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']))
+1
View File
@@ -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"; }
}
?>
-8
View File
@@ -1,8 +0,0 @@
<?php
if (!$os)
{
if(preg_match('/HP [a-zA-Z0-9-]+ Switch Software Version/',$sysDescr)) { $os = "hp"; }
}
?>
+3
View File
@@ -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));
}
?>
-6
View File
@@ -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));
?>