Testing VyOS support

This commit is contained in:
Paul Gear
2014-11-22 17:47:32 +10:00
parent 62532e652f
commit 198cf9ac08
5 changed files with 30 additions and 2 deletions

BIN
html/images/os/vyos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -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.

View File

@@ -5,4 +5,4 @@ if (!$os)
if (preg_match("/^Vyatta/", $sysDescr)) { $os = "vyatta"; }
}
?>
?>

View File

@@ -0,0 +1,10 @@
<?php
if (!$os || $os == "vyatta") {
if (preg_match("/^Vyatta VyOS/", $sysDescr) || preg_match("/^VyOS/", $sysDescr)) {
$sysDescr = "VyOS";
$os = "vyos";
}
}
?>

View 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);
?>