Index: includes/polling/mempools/trapeze.inc.php
===================================================================
--- includes/polling/mempools/trapeze.inc.php	(revision 0)
+++ includes/polling/mempools/trapeze.inc.php	(working copy)
@@ -0,0 +1,12 @@
+<?php
+//  Hardcoded discovery of memory usage on trapeze (Juniper wireless) devices.
+//
+//  TRAPEZE-NETWORKS-SYSTEM-MIB::trpzSysCpuMemorySize.0
+//  TRAPEZE-NETWORKS-SYSTEM-MIB::trpzSysCpuMemoryLastMinuteUsage.0
+
+
+$mempool['used'] = snmp_get($device, ".1.3.6.1.4.1.14525.4.8.1.1.12.2.0", "-OQUvs", "TRAPEZE-NETWORKS-SYSTEM-MIB", $config['mib_dir'].':'.mib_dirs('trapeze'));
+$mempool['total'] = snmp_get($device, ".1.3.6.1.4.1.14525.4.8.1.1.6.0", "-OQUvs", "TRAPEZE-NETWORKS-SYSTEM-MIB", $config['mib_dir'].':'.mib_dirs('trapeze'));
+$mempool['free'] = $mempool['total'] - $mempool['used'];
+
+?>
Index: includes/polling/wifi.inc.php
===================================================================
--- includes/polling/wifi.inc.php	(revision 4994)
+++ includes/polling/wifi.inc.php	(working copy)
@@ -16,6 +16,13 @@
     // FIXME Also interesting to poll? dhcpNumber.0 for number of active dhcp leases
   }
 
+  if ($device['os'] == 'trapeze')
+  {
+    echo("Checking Trapeze Wireless clients... ");
+    $wificlients1 = snmp_get($device, "trpzClSessTotalSessions.0", "-OUqnv", "TRAPEZE-NETWORKS-CLIENT-SESSION-MIB", $config['mib_dir'].':'.mib_dirs('trapeze'));
+    echo($wificlients1 . " clients\n");
+  }
+
   if ($device['os'] == 'ios' && $device['type'] == 'wireless')
   {
     echo("Checking Aironet Wireless clients... ");
Index: includes/polling/os/trapeze.inc.php
===================================================================
--- includes/polling/os/trapeze.inc.php	(revision 0)
+++ includes/polling/os/trapeze.inc.php	(working copy)
@@ -0,0 +1,19 @@
+<?php
+
+# "Juniper Networks, Inc WLC880R 8.0.3.15 REL"
+list(,,,$hardware,$version,) = explode(" ", $poll_device['sysDescr']);
+
+# TRAPEZE-NETWORK-ROOT-MIB::trpzSerialNumber.0 = STRING: "JJ01234567"
+$serial = trim(snmp_get($device, ".1.3.6.1.4.1.14525.4.2.1.1.0", "-OQv", "TRAPEZE-NETWORK-ROOT-MIB", $config['mib_dir'].':'.mib_dirs('trapeze')),'"');
+
+# TRAPEZE-NETWORK-ROOT-MIB::trpzVersionString.0 = STRING: "8.0.3.15.0"
+$version = trim(snmp_get($device, ".1.3.6.1.4.1.14525.4.2.1.4.0", "-OQv", "TRAPEZE-NETWORK-ROOT-MIB", $config['mib_dir'].':'.mib_dirs('trapeze')),'"');
+
+$domain = trim(snmp_get($device, ".1.3.6.1.4.1.14525.4.2.2.1.0", "-OQv", "TRAPEZE-NETWORK-ROOT-MIB", $config['mib_dir'].':'.mib_dirs('trapeze')),'"');
+
+if ($domain)
+{
+  $features="Cluster: $domain";
+}
+
+?>
Index: includes/discovery/mempools/trapeze-networks-system-mib.inc.php
===================================================================
--- includes/discovery/mempools/trapeze-networks-system-mib.inc.php	(revision 0)
+++ includes/discovery/mempools/trapeze-networks-system-mib.inc.php	(working copy)
@@ -0,0 +1,23 @@
+<?php
+
+//  Hardcoded discovery of memory usage on trapeze (Juniper wireless) devices.
+//
+//  TRAPEZE-NETWORKS-SYSTEM-MIB::trpzSysCpuMemorySize.0
+//  TRAPEZE-NETWORKS-SYSTEM-MIB::trpzSysCpuMemoryLastMinuteUsage.0
+
+
+echo(" TRAPEZE-NETWORKS-SYSTEM-MIB ");
+
+$descr = "Memory";
+$used = snmp_get($device, ".1.3.6.1.4.1.14525.4.8.1.1.12.2.0", "-OQUvs", "TRAPEZE-NETWORKS-SYSTEM-MIB", $config['mib_dir'].':'.mib_dirs('trapeze'));
+$total = snmp_get($device, ".1.3.6.1.4.1.14525.4.8.1.1.6.0", "-OQUvs", "TRAPEZE-NETWORKS-SYSTEM-MIB", $config['mib_dir'].':'.mib_dirs('trapeze'));
+//echo($used);
+//echo($total);
+if (is_numeric($used) && is_numeric($total))
+{
+    $percent = $used * 100 / $total;
+    discover_mempool($valid_mempool, $device, 0, "trapeze", $descr, "1", NULL, NULL);
+}
+
+// EOF
+
Index: includes/discovery/sensors/trapeze-networks-system-mib.inc.php
===================================================================
--- includes/discovery/sensors/trapeze-networks-system-mib.inc.php	(revision 0)
+++ includes/discovery/sensors/trapeze-networks-system-mib.inc.php	(working copy)
@@ -0,0 +1,22 @@
+<?php
+
+// Supply
+echo(" Supply ");
+
+$sensor_state_type = "trapeze-state";
+$oids = snmpwalk_cache_oid($device, 'trpzSysPowerSupplyEntry', array(), 'TRAPEZE-NETWORKS-SYSTEM-MIB', mib_dirs('trapeze'));
+
+foreach ($oids as $index => $entry)
+{
+  if (isset($entry['trpzSysPowerSupplyStatus']))
+  {
+    $oid  = '.1.3.6.1.4.1.14525.4.8.1.1.13.1.2.1.'.$index;
+    echo($index);
+    //Not numerical values, only states
+    $value = state_string_to_numeric($sensor_state_type, $entry['trpzSysPowerSupplyStatus']);
+      discover_sensor($valid['sensor'], 'power', $device, $oid, $index, $sensor_state_type, $entry['trpzSysPowerSupplyDescr'], 1, 1,
+                      NULL, NULL, NULL, NULL, $value);
+  }
+}
+
+?>
Index: includes/discovery/processors/trapeze-networks-system-mib.inc.php
===================================================================
--- includes/discovery/processors/trapeze-networks-system-mib.inc.php	(revision 0)
+++ includes/discovery/processors/trapeze-networks-system-mib.inc.php	(working copy)
@@ -0,0 +1,17 @@
+<?php
+
+//  Hardcoded discovery of cpu usage on trapeze (Juniper wireless) devices.
+//
+//  TRAPEZE-NETWORKS-SYSTEM-MIB::trpzSysCpuLastMinuteLoad.0 = COUNTER: 100
+
+echo(" TRAPEZE-NETWORKS-SYSTEM-MIB ");
+
+$descr = "Processor";
+$usage = snmp_get($device, ".1.3.6.1.4.1.14525.4.8.1.1.11.2.0", "-OQUvs", "TRAPEZE-NETWORKS-SYSTEM-MIB", $config['mib_dir'].':'.mib_dirs('trapeze'));
+
+if (is_numeric($usage))
+{
+  discover_processor($valid['processor'], $device, "1.3.6.1.4.1.14525.4.8.1.1.11.2.0", "0", "cpu", $descr, "1", $usage, NULL, NULL);
+}
+
+// EOF
Index: includes/definitions/os.inc.php
===================================================================
--- includes/definitions/os.inc.php	(revision 4994)
+++ includes/definitions/os.inc.php	(working copy)
@@ -1562,6 +1562,17 @@
 $config['os'][$os]['over'][1]['text']   = "Number of Clients";
 $config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.6486.800.1.1.2.2"; // Rebranded Alcatel
 
+$os = "trapeze";
+$config['os'][$os]['text']              = "Juniper Wireless";
+$config['os'][$os]['type']              = "wireless";
+$config['os'][$os]['icon']              = "juniper";
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.14525.3.3.1";
+$config['os'][$os]['over'][0]['graph']  = "device_bits";
+$config['os'][$os]['over'][0]['text']   = "Traffic";
+$config['os'][$os]['over'][1]['graph']  = "device_wifi_clients";
+$config['os'][$os]['over'][1]['text']   = "Number of Clients";
+$config['os'][$os]['mibs'][]            = "TRAPEZE-NETWORKS-SYSTEM-MIB";
+
 $os = "lcos";
 $config['os'][$os]['text']		= "LANCOM OS";
 $config['os'][$os]['type']		= "wireless";
Index: includes/definitions/sensors.inc.php
===================================================================
--- includes/definitions/sensors.inc.php	(revision 4994)
+++ includes/definitions/sensors.inc.php	(working copy)
@@ -80,8 +80,15 @@
 $config['sensor_states']['powernet-sync-state'][1] = array('name' => 'inSync',     'event' => 'up');
 $config['sensor_states']['powernet-sync-state'][2] = array('name' => 'outOfSync',  'event' => 'alert');
                                                                                                                                                                  
-/// FIXME. $config['sensor_types'] >> $config['sensor']['types']
+// TRAPEZE-NETWORKS-SYSTEM-MIB
+$config['sensor_states']['trapeze-state'][1] = array('name' => 'other',         'event' => 'warning');
+$config['sensor_states']['trapeze-state'][2] = array('name' => 'unknown',        'event' => 'warning');
+$config['sensor_states']['trapeze-state'][3] = array('name' => 'ac-failed',       'event' => 'alert');
+$config['sensor_states']['trapeze-state'][4] = array('name' => 'dc-failed',       'event' => 'alert');
+$config['sensor_states']['trapeze-state'][5] = array('name' => 'ac-ok-dc-ok',     'event' => 'up');
 
+// FIXME. $config['sensor_types'] >> $config['sensor']['types']
+
 // The order these are entered here defines the order they are shown in the web interface
 $config['sensor_types']['temperature'] = array( 'symbol' => 'C',   'text' => 'Celsius', 'icon' => 'oicon-thermometer-high');
 $config['sensor_types']['humidity']    = array( 'symbol' => '%',   'text' => 'Percent', 'icon' => 'oicon-water');
