From d791179cc3ebfb6b447f4587b697eadbbb3fa797 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sat, 17 Jul 2010 14:40:02 +0000 Subject: [PATCH] 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 --- CHANGELOG | 19 ++++++++++++++++++- html/images/os/broadcom.png | Bin 0 -> 771 bytes includes/functions.php | 22 +++++++++++++++------- includes/osdiscovery/discover-bcm963.php | 10 ++++++++++ includes/static-config.php | 3 +++ 5 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 html/images/os/broadcom.png create mode 100644 includes/osdiscovery/discover-bcm963.php diff --git a/CHANGELOG b/CHANGELOG index 6004193b0d..76d8f85003 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/html/images/os/broadcom.png b/html/images/os/broadcom.png new file mode 100644 index 0000000000000000000000000000000000000000..715117c1263b270c0265e025bf941e1c970081a7 GIT binary patch literal 771 zcmV+e1N{7nP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D00(qQO+^RT1_KZ? zFYM5jwEzGB8FWQhbW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE;UJt{NMlp0$@o*K~z{r z?bT066;Tw&@u&HRGE*z?X{afZSXNZ@Y^7KVVVhhUNsDSFxDjcgMYM{jXkn!xq9#!Z zMk*Q=(I!ooN{b*3A3~H+_>cZ-et)ksi$WL9ESrH3cV_Or=iE8-FA(rIzXE;*{0g|N zKsYs&gAcgpGK9BjB(B3Wmay4dG#9f;dJ~OUzw( zT!ip8g`{6ljz_raE!rAqlQ0Rtb?^KnyfC&-#=r)>-%lc7CB1^LT(~c!OJ*!VT*S z(oSFmarllFe1#VI9(OT}cBnd|xPTvMwEh{|C}#n>8U=WPCm6$9d_)KIwcChATt<^E zW)JNgR3$BB2o2bTeKuYT*7yO0p@olQ&`GZL6sGYQPc4{AHH&M|757@ds`1jsoTvSa z=jg_DyoRp6&SJJ%;)}Fh(1of(cc5Dn*)mZ~Jq~rHdQtJf`Q4j!su`?6vLBTiXqHl z5}#0wXlIpbIquZE|IfL-oST8OxJWn0+x3QE)?&`nUO}qziU#RtBJXe(@itk1yKcO~ zQG4Z1(Efxf^Vh~XeVR2^uV^mxnGWL&B2PQ*4z%N&lUFD8QPD%Q;zpm6j$skwI$miY z=TmSW`Z=kJs#L}*W8*Au(rS7A^L_>V3j9A6SO%|A^4%@|=a~Qi002ovPDHLkV1g(Q BRZjo_ literal 0 HcmV?d00001 diff --git a/includes/functions.php b/includes/functions.php index b801dd3f52..1f85f40c5f 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -207,13 +207,21 @@ function getImage($host) $sql = "SELECT * FROM `devices` WHERE `device_id` = '$host'"; $data = mysql_fetch_array(mysql_query($sql)); $type = strtolower($data['os']); - if (file_exists($config['html_dir'] . "/images/os/$type" . ".png")){ $image = ''; - } elseif (file_exists($config['html_dir'] . "/images/os/$type" . ".gif")){ $image = ''; } - if ($type == "linux") { - $features = strtolower(trim($data['features'])); - list($distro) = split(" ", $features); - if (file_exists($config['html_dir'] . "/images/os/$distro" . ".png")){ $image = ''; - } elseif (file_exists($config['html_dir'] . "/images/os/$distro" . ".gif")){ $image = ''; } + if ($config['os'][$type]['icon'] && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$type]['icon'] . ".png")) + { + $image = ''; + } elseif ($config['os'][$type]['icon'] && file_exists($config['html_dir'] . "/images/os/". $config['os'][$type]['icon'] . ".gif")) + { + $image = ''; + } else { + if (file_exists($config['html_dir'] . "/images/os/$type" . ".png")){ $image = ''; + } elseif (file_exists($config['html_dir'] . "/images/os/$type" . ".gif")){ $image = ''; } + if ($type == "linux") { + $features = strtolower(trim($data['features'])); + list($distro) = split(" ", $features); + if (file_exists($config['html_dir'] . "/images/os/$distro" . ".png")){ $image = ''; + } elseif (file_exists($config['html_dir'] . "/images/os/$distro" . ".gif")){ $image = ''; } + } } return $image; } diff --git a/includes/osdiscovery/discover-bcm963.php b/includes/osdiscovery/discover-bcm963.php new file mode 100644 index 0000000000..bf69985551 --- /dev/null +++ b/includes/osdiscovery/discover-bcm963.php @@ -0,0 +1,10 @@ + diff --git a/includes/static-config.php b/includes/static-config.php index ab144243d7..a047ff002d 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -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";