mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add symbol ap support (thanks to David Magniez)
git-svn-id: http://www.observium.org/svn/observer/trunk@2431 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
* See COPYING for more details.
|
||||
*/
|
||||
|
||||
$debug=1;
|
||||
|
||||
include("includes/defaults.inc.php");
|
||||
include("config.php");
|
||||
include("includes/functions.php");
|
||||
|
||||
+8
-3
@@ -165,12 +165,17 @@ function discover_device($device, $options)
|
||||
$device_start = utime(); // Start counting device poll time
|
||||
|
||||
echo($device['hostname'] . " ".$device['device_id']." ".$device['os']." ");
|
||||
if ($device['os'] != strtolower($device['os']))
|
||||
|
||||
if($device['os'] == 'generic') // verify if OS has changed from generic
|
||||
{
|
||||
$device['os'] = strtolower($device['os']);
|
||||
$device['os']= getHostOS($device);
|
||||
if($device['os'] != 'generic')
|
||||
{
|
||||
echo "Device os was updated to".$device['os']."!";
|
||||
dbUpdate(array('os' => $device['os']), 'devices', '`device_id` = ?', array($device['device_id']));
|
||||
echo("OS lowercased.");
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['os'][$device['os']]['group'])
|
||||
{
|
||||
$device['os_group'] = $config['os'][$device['os']]['group'];
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 940 B |
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (strstr($sysObjectId, ".1.3.6.1.4.1.388")) { $os = "symbol"; }
|
||||
echo "symbol";
|
||||
}
|
||||
else{
|
||||
echo "os already defined";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
$fnSysVersion = snmp_get($device, ".1.3.6.1.4.1.388.11.2.2.1.3.2.0", "-Ovq");
|
||||
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.388.11.2.2.1.1.0", "-Ovq"),'"');
|
||||
$version = trim(snmp_get($device, ".1.3.6.1.4.1.388.11.2.2.1.3.2.0", "-Ovq"),'"');
|
||||
//preg_match("/HW=(^\s]+)/",$sysDescr,$hardwarematches);
|
||||
preg_match("/\s+[^\s]+/",$poll_device[sysDescr],$hardwarematches);
|
||||
$hardware = $hardwarematches[0];
|
||||
?>
|
||||
@@ -46,6 +46,15 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
|
||||
}
|
||||
}
|
||||
|
||||
if ($device['os'] == 'symbol' AND (stristr($device['hardware'],"AP")))
|
||||
{
|
||||
echo("Checking Symbol Wireless clients... ");
|
||||
|
||||
$wificlients1 = snmp_get($device, ".1.3.6.1.4.1.388.11.2.4.2.100.10.1.18.1", "-Ovq");
|
||||
|
||||
echo(($wificlients1 +0) . " clients on wireless connector, ");
|
||||
}
|
||||
|
||||
|
||||
##### RRD Filling Code
|
||||
if (isset($wificlients1) && $wificlients1 != "")
|
||||
|
||||
@@ -734,6 +734,11 @@ $config['os'][$os]['over'][0]['graph'] = "device_current";
|
||||
$config['os'][$os]['over'][0]['text'] = "Current";
|
||||
$config['os'][$os]['icon'] = "tripplite";
|
||||
|
||||
$os = "symbol";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
$config['os'][$os]['text'] = "Symbol AP";
|
||||
$config['os'][$os]['icon'] = "symbol";
|
||||
|
||||
foreach($config['os'] as $this_os => $blah)
|
||||
{
|
||||
if (isset($config['os'][$this_os]['group']))
|
||||
|
||||
+16700
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user