AlliedTelesyn Support

git-svn-id: http://www.observium.org/svn/observer/trunk@1056 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-04-08 18:26:24 +00:00
parent 0627891af0
commit 2585058963
8 changed files with 46 additions and 4 deletions

View File

@@ -148,6 +148,16 @@ while ($device = mysql_fetch_array($device_query))
{
if ($device['type'] == "unknown") { $device['type'] = 'network'; }
}
if($device['os'] == "allied")
{
if ($device['type'] == "unknown") { $device['type'] = 'network'; }
}
if($device['os'] == "allied")
{
if ($device['type'] == "unknown") { $device['type'] = 'network'; }
}
$update_query = "UPDATE `devices` SET ";
$update_query .= " `last_discovered` = NOW(), `type` = '" . $device['type'] . "'";

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -0,0 +1,6 @@
<?php
#include("cpu.inc.php");
#include("temperatures.inc.php");
include("netstats.inc.php");
include("uptime.inc.php");
?>

View File

@@ -5,7 +5,7 @@ print_optionbar_start();
echo("
<a href='".$config['base_url']. "/vrfs/'>Basic</a> | Graphs :
<a href='".$config['base_url']. "/vrfs/bits/'>Bits</a> |
<a href='".$config['base_url']. "/vrfs/pkts/'>Packets</a> |
<a href='".$config['base_url']. "/vrfs/upkts/'>Packets</a> |
<a href='".$config['base_url']. "/vrfs/nupkts/'>NU Packets</a> |
<a href='".$config['base_url']. "/vrfs/errors/'>Errors</a>
");
@@ -46,7 +46,7 @@ print_optionbar_end();
$port['from'] = $day;
$port['to'] = $now;
$port['bg'] = "#".$bg;
$port['graph_type'] = $_GET['opta'];
$port['graph_type'] = "port_".$_GET['opta'];
echo("<div style='display: block; padding: 3px; margin: 3px; min-width: 135px; max-width:135px; min-height:75px; max-height:75px;
text-align: center; float: left; background-color: ".$list_colour_b_b.";'>
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>");

View File

@@ -0,0 +1,10 @@
<?php
if(!$os) {
$sysObjectId = shell_exec($config['snmpget'] . " -Ovqn -".$device['snmpver']." -c ". $device['community'] ." ". $device['hostname'].":".$device['port'] ." sysObjectID.0");
if(strstr($sysObjectId, ".1.3.6.1.4.1.207")) { $os = "allied"; }
}
?>

View File

@@ -0,0 +1,15 @@
<?php
echo("Doing Allied Telesyn AlliedWare ");
$serial = "";
list(,$hardware,) = explode(" ", $hardware);
$hardware = $sysDescr;
$features = "";
echo("$hardware - $version - $features - $serial\n");
include("hr-mib.inc.php");
?>

View File

@@ -28,7 +28,6 @@ $os_groups['solaris'] = "unix";
$os_groups['adva'] = "unix";
$os_groups['opensolaris'] = "unix";
$os_groups['iosxe'] = "ios";
$os_groups['iosxr'] = "ios";
$os_groups['ios'] = "ios";
@@ -62,6 +61,7 @@ $os_text['procurve'] = "HP ProCurve";
$os_text['speedtouch'] = "Thomson Speedtouch";
$os_text['dell-laser'] = "Dell Laser Printer";
$os_text['adva'] = "Adva";
$os_text['allied'] = "AlliedWare";
if(!$config['graph_colours']['greens']) {
$config['graph_colours']['greens'] = array('B6D14B','91B13C','6D912D','48721E','24520F','003300');

View File

@@ -222,8 +222,9 @@ while ($device = mysql_fetch_array($device_query)) {
$poll_update_query = "UPDATE `devices` SET ";
$poll_update_query .= $poll_update;
$poll_update_query .= " WHERE `device_id` = '" . $device['device_id'] . "'";
echo("Updating " . $device['hostname'] . " - $poll_update_query \n");
if($debug) {echo("Updating " . $device['hostname'] . " - $poll_update_query \n");}
$poll_update_result = mysql_query($poll_update_query);
if(mysql_affected_rows() == "1") { echo("UPDATED!"); } else { echo("NOT UPDATED!"); }
} else {
echo("No Changes to " . $device['hostname'] . "\n");
}