mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #659 from laf/issue-laf-152
Added basic Ubiquiti Wireless support
This commit is contained in:
BIN
html/images/os/ubiquiti.png
Normal file
BIN
html/images/os/ubiquiti.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -580,6 +580,13 @@ $config['os'][$os]['text'] = "D-Link Access Point";
|
||||
$config['os'][$os]['type'] = "wireless";
|
||||
$config['os'][$os]['icon'] = "dlink";
|
||||
|
||||
$os = "ubiquitiap";
|
||||
$config['os'][$os]['text'] = "Ubiquiti Networks Wireless";
|
||||
$config['os'][$os]['type'] = "wireless";
|
||||
$config['os'][$os]['icon'] = "ubiquiti";
|
||||
$config['os'][$os]['over'][0]['graph'] = "device_bits";
|
||||
$config['os'][$os]['over'][0]['text'] = "Device Traffic";
|
||||
|
||||
$os = "axiscam";
|
||||
$config['os'][$os]['text'] = "AXIS Network Camera";
|
||||
$config['os'][$os]['icon'] = "axis";
|
||||
|
||||
9
includes/discovery/os/ubiquitiap.inc.php
Normal file
9
includes/discovery/os/ubiquitiap.inc.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!$os || $os == 'linux') {
|
||||
if (stristr(snmp_get($device, "dot11manufacturerName.5", "-Oqv", "IEEE802dot11-MIB"),"Ubiquiti Networks") || stristr(snmp_get($device, "dot11manufacturerName.6", "-Oqv", "IEEE802dot11-MIB"),"Ubiquiti Networks")) {
|
||||
$os = "ubiquitiap";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
13
includes/polling/os/ubiquitiap.inc.php
Normal file
13
includes/polling/os/ubiquitiap.inc.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$data = snmp_get_multi($device, "dot11manufacturerProductName.5 dot11manufacturerProductVersion.5", "-Oqv", "IEEE802dot11-MIB");
|
||||
if (empty($data)) {
|
||||
$data = snmp_get_multi($device, "dot11manufacturerProductName.6 dot11manufacturerProductVersion.6", "-Oqv", "IEEE802dot11-MIB");
|
||||
}
|
||||
$hardware = $data[0];
|
||||
|
||||
if (preg_match("/(v[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $data[1],$matches)) {
|
||||
$version = $matches[0];
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user