mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Testing VyOS support
This commit is contained in:
BIN
html/images/os/vyos.png
Normal file
BIN
html/images/os/vyos.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 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"; }
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
10
includes/discovery/os/vyos.inc.php
Normal file
10
includes/discovery/os/vyos.inc.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
if (!$os || $os == "vyatta") {
|
||||
if (preg_match("/^Vyatta VyOS/", $sysDescr) || preg_match("/^VyOS/", $sysDescr)) {
|
||||
$sysDescr = "VyOS";
|
||||
$os = "vyos";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
5
includes/polling/os/vyos.inc.php
Normal file
5
includes/polling/os/vyos.inc.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
list($features, $version) = explode("-", trim(str_replace("VyOS", "", snmp_get($device, "SNMPv2-MIB::sysDescr.0", "-Oqv", "SNMPv2-MIB"))), 2);
|
||||
|
||||
?>
|
Reference in New Issue
Block a user