mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added basic detection for Mellanox devices
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -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";
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (stristr($sysDescr, "mellanox")) {
|
||||
$os = "mellanox";
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user