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:
Adam Amstrong
2011-09-08 13:36:32 +00:00
parent 9fc744aac3
commit 52ebbeab79
9 changed files with 37757 additions and 6 deletions
-2
View File
@@ -12,8 +12,6 @@
* See COPYING for more details.
*/
$debug=1;
include("includes/defaults.inc.php");
include("config.php");
include("includes/functions.php");
+9 -4
View File
@@ -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']);
dbUpdate(array('os' => $device['os']), 'devices', '`device_id` = ?', array($device['device_id']));
echo("OS lowercased.");
$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']));
}
}
if ($config['os'][$device['os']]['group'])
{
$device['os_group'] = $config['os'][$device['os']]['group'];
Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

+12
View File
@@ -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";
}
?>
+9
View File
@@ -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];
?>
+9
View File
@@ -45,6 +45,15 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
unset($wirelesscards);
}
}
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
+5
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff