Added basic detection for Mellanox devices

This commit is contained in:
laf
2015-06-27 22:52:01 +01:00
parent aed0fedf02
commit 116a64deb9
4 changed files with 25 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+10
View File
@@ -656,6 +656,16 @@ $config['os'][$os]['over'][1]['text'] = "CPU Usage";
#$config['os'][$os]['over'][2]['graph'] = "device_mempool";
#$config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "mellanox";
$config['os'][$os]['text'] = "Mellanox";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Device Traffic";
$config['os'][$os]['over'][1]['graph'] = "device_processor";
$config['os'][$os]['over'][1]['text'] = "CPU Usage";
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "powervault";
$config['os'][$os]['text'] = "Dell PowerVault";
$config['os'][$os]['icon'] = "dell";
+7
View File
@@ -0,0 +1,7 @@
<?php
if (!$os) {
if (stristr($sysDescr, "mellanox")) {
$os = "mellanox";
}
}
+8
View File
@@ -0,0 +1,8 @@
<?php
if (stristr($poll_device['sysDescr'], "Linux")) {
list(,,$version,$hardware) = explode(' ', $poll_device['sysDescr']);
} else {
list($hardware,,$version) = explode(',',$poll_device['sysDescr']);
$hardware = preg_replace("/Mellanox /","", $hardware);
}