mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Merge pull request #351 from paulgear/vyos-support
Basic recognition of VyOS
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -22,6 +22,8 @@ $config['os_group'][$os_group]['over'][1]['text'] = "Memory Usage";
|
||||
$os = "generic";
|
||||
$config['os'][$os]['text'] = "Generic Device";
|
||||
|
||||
// Linux-based routers/switches
|
||||
|
||||
$os = "vyatta";
|
||||
$config['os'][$os]['text'] = "Vyatta";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
@@ -30,7 +32,18 @@ $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'] = "Processor Usage";
|
||||
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
|
||||
$config['os'][$os]['over'][2]['graph'] = "device_ucd_memory";
|
||||
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
|
||||
|
||||
$os = "vyos";
|
||||
$config['os'][$os]['text'] = "VyOS";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
$config['os'][$os]['ifname'] = 1;
|
||||
$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'] = "Processor Usage";
|
||||
$config['os'][$os]['over'][2]['graph'] = "device_ucd_memory";
|
||||
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
|
||||
|
||||
// Linux-based OSes here please.
|
||||
|
||||
@@ -5,4 +5,4 @@ if (!$os)
|
||||
if (preg_match("/^Vyatta/", $sysDescr)) { $os = "vyatta"; }
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!$os || $os == "vyatta") {
|
||||
if (preg_match("/^Vyatta VyOS/", $sysDescr) || preg_match("/^VyOS/", $sysDescr)) {
|
||||
$os = "vyos";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
# Remove Vyatta prefix
|
||||
$device['sysDescr'] = str_replace("Vyatta ", "", $device['sysDescr']);
|
||||
|
||||
# Version is second remaining word in sysDescr
|
||||
list(,$version) = explode(" ", $device['sysDescr']);
|
||||
|
||||
$features = "";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user