add broadcom detection and image. add ability to define image in $config['os'][$os]['icon']

git-svn-id: http://www.observium.org/svn/observer/trunk@1377 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-17 14:40:02 +00:00
parent c38f7087d7
commit d791179cc3
5 changed files with 46 additions and 8 deletions
+18 -1
View File
@@ -1,7 +1,24 @@
For more granular updates check http://twitter.com/observium or
http://www.observium.org/websvn/listing.php?repname=observer
Release 0.10.6
Release 0.10.7 ( SVN )
* Project name has changed to Observium
* rrdcached support
* Discovery of new device/os types :
Apple Airport, Axis Camera, Motorola Netopia, APC Switch PDU,
Extreme Extremware, Redback, ZyXEL ZyWALL, DELL DRAC,
Dell PowerVault, Allied Telesis, Cisco NX-OS, MGE Evolution UPS
HP JetDirect printers, APC STS/ATS, Mikrotic RouterOS,
AKCP SensorProbe3
* Temperature detection from CISCO-ENTITY-SENSOR-MIB
* Graphing of statistics from DISKIO-MIB
* Ongoing unification of all sensors into one 'sensors' framework
* Detection and polling of frequency, voltage and ampage stats
for many UPSes and power switching hardware
Release 0.10.6 ( 21st June 2010 )
Changed netstats (icmp, udp, tcp, snmp, ip) stats collection
Implemented new application monitoring system
Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

+8
View File
@@ -207,6 +207,13 @@ function getImage($host)
$sql = "SELECT * FROM `devices` WHERE `device_id` = '$host'";
$data = mysql_fetch_array(mysql_query($sql));
$type = strtolower($data['os']);
if ($config['os'][$type]['icon'] && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$type]['icon'] . ".png"))
{
$image = '<img src="'.$config['base_url'].'/images/os/'.$config['os'][$type]['icon'].'.png" />';
} elseif ($config['os'][$type]['icon'] && file_exists($config['html_dir'] . "/images/os/". $config['os'][$type]['icon'] . ".gif"))
{
$image = '<img src="'.$config['base_url'].'/images/os/'.$config['os'][$type]['icon'].'.gif" />';
} else {
if (file_exists($config['html_dir'] . "/images/os/$type" . ".png")){ $image = '<img src="'.$config['base_url'].'/images/os/'.$type.'.png" />';
} elseif (file_exists($config['html_dir'] . "/images/os/$type" . ".gif")){ $image = '<img src="'.$config['base_url'].'/images/os/'.$type.'.gif" />'; }
if ($type == "linux") {
@@ -215,6 +222,7 @@ function getImage($host)
if (file_exists($config['html_dir'] . "/images/os/$distro" . ".png")){ $image = '<img src="'.$config['base_url'].'/images/os/'.$distro.'.png" />';
} elseif (file_exists($config['html_dir'] . "/images/os/$distro" . ".gif")){ $image = '<img src="'.$config['base_url'].'/images/os/'.$distro.'.gif" />'; }
}
}
return $image;
}
+10
View File
@@ -0,0 +1,10 @@
<?php
if(!$os) {
if(stripos($sysDescr, "bcm963") !== FALSE) { $os = "bcm963"; }
}
?>
+3
View File
@@ -105,6 +105,9 @@ $config['os']['powervault']['text'] = "Dell PowerVault";
$config['os']['drac']['text'] = "Dell DRAC";
$config['os']['bcm963']['text'] = "Broadcom BCM963xxx";
$config['os']['bcm963']['icon'] = "broadcom";
$config['os']['netopia']['text'] = "Motorola Netopia";
$config['os']['netopia']['type'] = "network";