mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added basic Ubiquiti 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: 794 B |
@@ -580,6 +580,11 @@ $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";
|
||||
|
||||
$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) {
|
||||
if (stristr(snmp_get($device, "dot11manufacturerName.5", "-Oqv", "IEEE802dot11-MIB"),"Ubiquiti Networks") ) {
|
||||
$os = "ubiquitiap";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
10
includes/polling/os/ubiquitiap.inc.php
Normal file
10
includes/polling/os/ubiquitiap.inc.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$data = snmp_get_multi($device, "dot11manufacturerProductName.5 dot11manufacturerProductVersion.5", "-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