Index: includes/definitions/os.inc.php
===================================================================
--- includes/definitions/os.inc.php	(revision 5821)
+++ includes/definitions/os.inc.php	(working copy)
@@ -1524,9 +1524,29 @@
 $config['os'][$os]['type']              = "power";
 $config['os'][$os]['over'][0]['graph']  = "device_current";
 $config['os'][$os]['over'][0]['text']   = "Current";
-$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318";
-$config['os'][$os]['mibs'][]            = "PowerNet-MIB";
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.1."; // BackUPS
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.2."; // SmartUPS
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.3."; // MatrixUPS
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.4."; // MasterSwitch
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.5."; // Symmetra
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.6."; // DP100E
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.7."; // DP300E
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.9."; // redundantSwitch
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.11"; // ATS
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.13"; // Symmetra
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.15"; // InfraStruXure PDU
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.16"; // AIS
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.17"; // SmartUPS
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.19"; // InfraStruXure ATS
+$config['os'][$os]['mibs'][]            = "POWERNET-MIB";
 
+$os = "apcinrow";
+$config['os'][$os]['text']              = "APC InRow";
+$config['os'][$os]['type']              = "environment";
+$config['os'][$os]['icon']              = "apc";
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318.1.3.14"; // InRow
+$config['os'][$os]['mibs'][]            = "POWERNET-INROW-MIB";
+
 $os = "oec";
 $config['os'][$os]['text']              = "OEC PDU";
 $config['os'][$os]['type']              = "power";
Index: includes/discovery/sensors/powernet-inrow-mib.inc.php
===================================================================
--- includes/discovery/sensors/powernet-inrow-mib.inc.php	(revision 0)
+++ includes/discovery/sensors/powernet-inrow-mib.inc.php	(working copy)
@@ -0,0 +1,276 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage discovery
+ * @copyright  (C) 2006-2014 Adam Armstrong
+ *
+ */
+
+echo(" POWERNET-INROW-MIB ");
+
+$inrow = array();
+$inrow['airIRRC100Series']['group']['status']['index']    = "airIRRCGroupStatus";
+$inrow['airIRRC100Series']['group']['status']['oid']      = ".1.3.6.1.4.1.318.1.1.13.3.2.1.1";
+$inrow['airIRRC100Series']['unit']['status']['index']     = "airIRRCUnitStatus";
+$inrow['airIRRC100Series']['unit']['status']['oid']       = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2";
+$inrow['airIRRC100Series']['unit']['thresholds']['index'] = "airIRRCUnitThresholds";
+
+$inrow['airIRRP100Series']['group']['status']['index']    = "airIRRP100GroupStatus";
+$inrow['airIRRP100Series']['group']['status']['oid']      = ".1.3.6.1.4.1.318.1.1.13.3.3.1.1.1";
+$inrow['airIRRP100Series']['unit']['status']['index']     = "airIRRP100UnitStatus";
+$inrow['airIRRP100Series']['unit']['status']['oid']       = ".1.3.6.1.4.1.318.1.1.13.3.3.1.2.2";
+$inrow['airIRRP100Series']['unit']['thresholds']['index'] = "airIRRP100UnitThresholds";
+
+$inrow['airIRRP500Series']['group']['status']['index']    = "airIRRP500GroupStatus";
+$inrow['airIRRP500Series']['group']['status']['oid']      = ".1.3.6.1.4.1.318.1.1.13.3.3.2.1.1";
+$inrow['airIRRP500Series']['unit']['status']['index']     = "airIRRP500UnitStatus";
+$inrow['airIRRP500Series']['unit']['status']['oid']       = ".1.3.6.1.4.1.318.1.1.13.3.3.2.2.2";
+$inrow['airIRRP500Series']['unit']['thresholds']['index'] = "airIRRP500UnitThresholds";
+
+$inrow['airIRSC100Series']['group']['status']['index']    = "airIRSCGroupStatus";
+$inrow['airIRSC100Series']['group']['status']['oid']      = ".1.3.6.1.4.1.318.1.1.13.3.4.2.1";
+$inrow['airIRSC100Series']['unit']['status']['index']     = "airIRSCUnitStatus";
+$inrow['airIRSC100Series']['unit']['status']['oid']       = ".1.3.6.1.4.1.318.1.1.13.3.4.1.2";
+$inrow['airIRSC100Series']['unit']['thresholds']['index'] = "airIRSCUnitThresholds";
+
+$inrow['airIRRD100Series']['group']['status']['index']    = "airIRG2GroupStatus";
+$inrow['airIRRD100Series']['group']['status']['oid']      = "1.3.6.1.4.1.318.1.1.13.4.2.1";
+$inrow['airIRRD100Series']['unit']['status']['index']     = "airIRG2RDT2Status";
+$inrow['airIRRD100Series']['unit']['status']['oid']       = "1.3.6.1.4.1.318.1.1.13.4.5.2.1";
+$inrow['airIRRD100Series']['unit']['thresholds']['index'] = "airIRG2RDT2Thresholds";
+
+$type = snmp_get($device, "sysObjectID.0", "-OUqsv", "PowerNet-MIB", mib_dirs("apc")); // Get the APC InRow model
+
+if(array_key_exists($type, $inrow)) // Check if the device is a supported APC InRow model as specifed above
+{
+  // APC InRow, Group Statistics
+  $oids = snmpwalk_cache_multi_oid($device, $inrow[$type]['group']['status']['index'], array(), "PowerNet-MIB", mib_dirs("apc"));
+
+  foreach ($oids as $index => $entry)
+  {
+    // airIRxxGroupStatusCoolOutput.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.1.x]
+    $descr = "Group - Cool Output";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".1." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "CoolOutput";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "power", $device, $oid, $name . "." . $index, "apcinrow", $descr, 100, $value * 100);
+    }
+
+    // airIRxxGroupStatusCoolDemand.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.2.x]
+    $descr = "Group - Cool Demand";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".2." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "CoolDemand";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "power", $device, $oid, $name . "." . $index, "apcinrow", $descr, 100, $value * 100);
+    }
+
+    // airIRxxGroupStatusAirFlowUS.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.3.x]
+    $descr = "Group - Air Flow";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".3." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "AirFlowUS";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "airflow", $device, $oid, $name . "." . $index, "apcinrow", $descr, 1, $value);
+    }
+
+    // airIRxxGroupStatusMaxRackInletTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.6.x]
+    $descr = "Group - Maximum Rack Inlet Temperature";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".6." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "MaxRackInletTempMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1);
+    }
+
+    // airIRxxGroupStatusMinRackInletTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.8.x]
+    $descr = "Group - Minimum Rack Inlet Temperature";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".8." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "MinRackInletTempMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1);
+    }
+
+    // airIRxxGroupStatusMaxReturnAirTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.10.x]
+    $descr = "Group - Maximum Return Air Temperature";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".10." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "MaxReturnAirTempMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1);
+    }
+
+    // airIRxxGroupStatusMinReturnAirTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.12.x]
+    $descr = "Group - Minimum Return Air Temperature";
+    $oid   = $inrow[$type]['group']['status']['oid'] . ".12." . $index;
+    $name  = $inrow[$type]['group']['status']['index'] . "MinReturnAirTempMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1);
+    }
+  }
+
+  unset($oids);
+
+  // APC InRow, Unit Statistics
+  $oids = snmpwalk_cache_multi_oid($device, $inrow[$type]['unit']['status']['index'], array(), "PowerNet-MIB", mib_dirs("apc"));
+  $oids = snmpwalk_cache_multi_oid($device, $inrow[$type]['unit']['thresholds']['index'], $oids, "PowerNet-MIB", mib_dirs("apc"));
+
+  foreach ($oids as $index => $entry)
+  {
+    // If there are multiple units found, use the unit number as description prefix
+    $unit = count($oids) != 1 ? "Unit " . ($index + 1) : "Unit";
+
+    // airIRxxUnitStatusCoolOutput.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.2.x]
+    $descr = $unit. " - Cool Output";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".2." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "CoolOutput";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "power", $device, $oid, $name . "." . $index, "apcinrow", $descr, 100, $value * 100);
+    }
+
+    // airIRxxUnitStatusCoolDemand.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.3.x]
+    $descr = $unit. " - Cool Demand";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".3." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "CoolDemand";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "power", $device, $oid, $name . "." . $index, "apcinrow", $descr, 100, $value * 100);
+    }
+
+    // airIRxxUnitStatusAirFlowUS.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.4.x]
+    $descr = $unit. " - Airflow";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".4." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "AirFlowUS";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "airflow", $device, $oid, $name . "." . $index, "apcinrow", $descr, 1, $value);
+    }
+
+    // airIRxxUnitStatusRackInletTempMetricd.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.7.x]
+    $descr = $unit. " - Rack Inlet Temperature";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".7." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "RackInletTempMetric";
+    $value = $entry[$name];
+    $limit = array('limit_high' => $entry[$inrow[$type]['unit']['thresholds']['index'] . 'RackInletHighTempMetric'] / 10);
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1, $limit);
+    }
+
+    // airIRxxUnitStatusSupplyAirTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.9.x]
+    $descr = $unit. " - Supply Air Temperature";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".9." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "SupplyAirTempMetric";
+    $value = $entry[$name];
+    $limit = array('limit_high' => $entry[$inrow[$type]['unit']['thresholds']['index'] . 'SupplyAirHighTempMetric'] / 10);
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1, $limit);
+    }
+
+    // airIRxxUnitStatusReturnAirTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.11.x]
+    $descr = $unit. " - Return Air Temperature";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".11." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "ReturnAirTempMetric";
+    $value = $entry[$name];
+    $limit = array('limit_high' => $entry[$inrow[$type]['unit']['thresholds']['index'] . 'ReturnAirHighTempMetric'] / 10);
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1, $limit);
+    }
+
+    // airIRxxUnitStatusSuctionTempMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.13.x]
+    $descr = $unit. " - Suction Temperature";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".13." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "SuctionTempMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1);
+    }
+
+    // airIRxxUnitStatusFilterDPMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.13.x]
+    $descr = $unit. " - Air Filter Pressure";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".13." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "FilterDPMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "pressure", $device, $oid, $name . "." . $index, "apcinrow", $descr, 1, $value);
+    }
+
+    // airIRxxUnitStatusContainmtDPMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.15.x]
+    $descr = $unit. " - Containment Pressure";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".15." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "ContainmtDPMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "pressure", $device, $oid, $name . "." . $index, "apcinrow", $descr, 1, $value);
+    }
+
+    // airIRxxUnitStatusEnteringFluidTemperatureMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.24.x]
+    $descr = $unit. " - Entering Fluid Temperature";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".24." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "EnteringFluidTemperatureMetric";
+    $value = $entry[$name];
+    $limit = array('limit_high' => $entry[$inrow[$type]['unit']['thresholds']['index'] . 'EnteringFluidHighTempMetric'] / 10);
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1, $limit);
+    }
+
+    // airIRxxUnitStatusLeavingFluidTemperatureMetric.x [.1.3.6.1.4.1.318.1.1.13.x.x.x.26.x]
+    $descr = $unit. " - Leaving Fluid Temperature";
+    $oid   = $inrow[$type]['unit']['status']['oid'] . ".26." . $index;
+    $name  = $inrow[$type]['unit']['status']['index'] . "LeavingFluidTemperatureMetric";
+    $value = $entry[$name];
+
+    if(is_numeric($value))
+    {
+      discover_sensor($valid['sensor'], "temperature", $device, $oid, $name . "." . $index, "apcinrow", $descr, 0.1, $value * 0.1);
+    }
+  }
+
+  unset($oids);
+}
+
+unset($type, $inrow);
+
+// EOF
Index: includes/discovery/sensors/powernet-mib.inc.php
===================================================================
--- includes/discovery/sensors/powernet-mib.inc.php	(revision 5821)
+++ includes/discovery/sensors/powernet-mib.inc.php	(working copy)
@@ -1250,170 +1250,6 @@
   }
 }
 
-#### INROW CHILLER ###################################################################################
-
-echo(" ");
-
-$cache['apc'] = array();
-
-foreach (array("airIRRCGroupStatus", "airIRRCGroupSetpoints") as $table)
-{
-  echo("$table ");
-  $cache['apc'] = snmpwalk_cache_multi_oid($device, $table, $cache['apc'], "PowerNet-MIB", mib_dirs('apc'));
-}
-
-foreach ($cache['apc'] as $index => $entry)
-{
-  if (count($cache['apc']) != 1) { $unitDescr = "Unit " . ($index+1) . " "; } else { $unitDescr = ""; }
-
-  $descr = "Group Min Rack Inlet Temperature";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.1.8.$index";
-  $value = $entry['airIRRCGroupStatusMinRackInletTempMetric'];
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCGroupStatusMinRackInletTempMetric.$index", 'apc', $descr, 0.1, $value / 10);
-
-  $descr = "Group Max Rack Inlet Temperature";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.1.6.$index";
-  $value = $entry['airIRRCGroupStatusMaxRackInletTempMetric'];
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCGroupStatusMaxRackInletTempMetric.$index", 'apc', $descr, 0.1, $value / 10);
-
-  $descr = "Group Cooling Setpoint";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.2.2.$index";
-  $value = $entry['airIRRCGroupSetpointsCoolMetric'];
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCGroupSetpointsCoolMetric.$index", 'apc', $descr, 0.1, $value / 10);
-
-  $descr = "Group Supply Setpoint";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.2.4.$index";
-  $value = $entry['airIRRCGroupSetpointsSupplyAirMetric'];
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCGroupSetpointsSupplyAirMetric.$index", 'apc', $descr, 0.1, $value / 10);
-
-  $descr = "Group Air Flow";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.1.3.$index";
-  $value = $entry['airIRRCGroupStatusAirFlowUS'];
-
-  discover_sensor($valid['sensor'], 'airflow', $device, $oid, "airIRRCGroupStatusAirFlowUS.$index", 'apc', $descr, 1, $value);
-
-  $descr = "Group Cooling Output";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.1.1.$index";
-  $value = $entry['airIRRCGroupStatusCoolOutput'];
-
-  discover_sensor($valid['sensor'], 'power', $device, $oid, "airIRRCGroupStatusCoolOutput.$index", 'apc', $descr, 100, $value * 100);
-
-  $descr = "Group Cooling Demand";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.1.1.2.$index";
-  $value = $entry['airIRRCGroupStatusCoolDemand'];
-
-  discover_sensor($valid['sensor'], 'power', $device, $oid, "airIRRCGroupStatusCoolDemand.$index", 'apc', $descr, 100, $value * 100);
-}
-
-echo(" ");
-
-$cache['apc'] = array();
-
-foreach (array("airIRRCUnitStatus") as $table)
-{
-  echo("$table ");
-  $cache['apc'] = snmpwalk_cache_multi_oid($device, $table, $cache['apc'], "PowerNet-MIB", mib_dirs('apc'));
-}
-
-foreach ($cache['apc'] as $index => $entry)
-{
-  if (count($cache['apc']) != 1) { $unitDescr = "Unit " . ($index+1) . " "; } else { $unitDescr = ""; }
-
-  $descr = $unitDescr . "Rack Inlet";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.7.$index";
-  $value = $entry['airIRRCUnitStatusRackInletTempMetric'];
-  $limits = array('limit_high' => $entry['airIRRCUnitThresholdsRackInletHighTempMetric'] / 10);
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCUnitStatusRackInletTempMetric.$index", 'apc', $descr, 0.1, $value / 10, $limits);
-
-  ## Rename code for older revisions
-  $old_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-Ra-" . $index . ".rrd");
-  $new_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-apc-airIRRCUnitStatusRackInletTempMetric." . $index . ".rrd");
-  if (is_file($old_rrd)) { rename($old_rrd,$new_rrd); echo("Moved RRD "); }
-
-  $descr = $unitDescr . "Supply Air";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.9.$index";
-  $value = $entry['airIRRCUnitStatusSupplyAirTempMetric'];
-  $limits = array('limit_high' => $entry['airIRRCUnitThresholdsSupplyAirHighTempMetric'] / 10);
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCUnitStatusSupplyAirTempMetric.$index", 'apc', $descr, 0.1, $value / 10, $limits);
-
-  ## Rename code for older revisions
-  $old_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-Su-" . $index . ".rrd");
-  $new_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-apc-airIRRCUnitStatusSupplyAirTempMetric." . $index . ".rrd");
-  if (is_file($old_rrd)) { rename($old_rrd,$new_rrd); echo("Moved RRD "); }
-
-  $descr = $unitDescr . "Return Air";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.11.$index";
-  $value = $entry['airIRRCUnitStatusReturnAirTempMetric'];
-  $limits = array('limit_high' => $entry['airIRRCUnitThresholdsReturnAirHighTempMetric'] / 10);
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCUnitStatusReturnAirTempMetric.$index", 'apc', $descr, 0.1, $value / 10, $limits);
-
-  ## Rename code for older revisions
-  $old_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-Re-" . $index . ".rrd");
-  $new_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-apc-airIRRCUnitStatusReturnAirTempMetric." . $index . ".rrd");
-  if (is_file($old_rrd)) { rename($old_rrd,$new_rrd); echo("Moved RRD "); }
-
-  $descr = $unitDescr . "Entering Fluid";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.24.$index";
-  $value = $entry['airIRRCUnitStatusEnteringFluidTemperatureMetric'];
-  $limit = $entry['airIRRCUnitThresholdsEnteringFluidHighTempMetric'];
-  $limits = array('limit_high' => $entry['airIRRCUnitThresholdsEnteringFluidHighTempMetric'] / 10);
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCUnitStatusEnteringFluidTemperatureMetric.$index", 'apc', $descr, 0.1, $value / 10, $limits);
-
-  ## Rename code for older revisions
-  $old_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-En-" . $index . ".rrd");
-  $new_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-apc-airIRRCUnitStatusEnteringFluidTemperatureMetric." . $index . ".rrd");
-  if (is_file($old_rrd)) { rename($old_rrd,$new_rrd); echo("Moved RRD "); }
-
-  $descr = $unitDescr . "Leaving Fluid";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.26.$index";
-  $value = $entry['airIRRCUnitStatusLeavingFluidTemperatureMetric'];
-
-  discover_sensor($valid['sensor'], 'temperature', $device, $oid, "airIRRCUnitStatusLeavingFluidTemperatureMetric.$index", 'apc', $descr, 0.1, $value / 10);
-
-  ## Rename code for older revisions
-  $old_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-Le-" . $index . ".rrd");
-  $new_rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("sensor-temperature-apc-airIRRCUnitStatusLeavingFluidTemperatureMetric." . $index . ".rrd");
-  if (is_file($old_rrd)) { rename($old_rrd,$new_rrd); echo("Moved RRD "); }
-
-  $descr = $unitDescr . "Air Flow";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.4.$index";
-  $value = $entry['airIRRCUnitStatusAirFlowUS'];
-
-  discover_sensor($valid['sensor'], 'airflow', $device, $oid, "airIRRCUnitStatusAirFlowUS.$index", 'apc', $descr, 1, $value);
-
-  $descr = $unitDescr . "Cooling Output";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.2.$index";
-  $value = $entry['airIRRCUnitStatusCoolOutput'];
-
-  discover_sensor($valid['sensor'], 'power', $device, $oid, "airIRRCUnitStatusCoolOutput.$index", 'apc', $descr, 100, $value * 100);
-
-  $descr = $unitDescr . "Cooling Demand";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.3.$index";
-  $value = $entry['airIRRCUnitStatusCoolDemand'];
-
-  discover_sensor($valid['sensor'], 'power', $device, $oid, "airIRRCUnitStatusCoolDemand.$index", 'apc', $descr, 100, $value * 100);
-
-  $descr = $unitDescr . " Air Filter Pressure";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.15.$index";
-  $value = $entry['airIRRCUnitStatusFilterDPMetric'];
-
-  discover_sensor($valid['sensor'], 'pressure', $device, $oid, "airIRRCUnitStatusFilterDPMetric.$index", 'apc', $descr, 1, $value);
-
-  $descr = $unitDescr . " Containment Pressure";
-  $oid   = ".1.3.6.1.4.1.318.1.1.13.3.2.2.2.13.$index";
-  $value = $entry['airIRRCUnitStatusContainmtDPMetric'];
-
-  discover_sensor($valid['sensor'], 'pressure', $device, $oid, "airIRRCUnitStatusContainmtDPMetric.$index", 'apc', $descr, 1, $value);
-}
-
 #### Legacy mUpsEnvironment Sensors (AP9312TH) #######################################################
 
 echo(" ");
Index: includes/polling/os/apcinrow.inc.php
===================================================================
--- includes/polling/os/apcinrow.inc.php	(revision 0)
+++ includes/polling/os/apcinrow.inc.php	(working copy)
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage poller
+ * @copyright  (C) 2006-2014 Adam Armstrong
+ *
+ */
+
+#sysDescr.0 = STRING: APC Web/SNMP Management Card (MB:v3.9.2 PF:v3.7.3 PN:apc_hw03_aos_373.bin AF1:v3.7.1 AN1:apc_hw03_acrptk_371.bin MN:ACRD101 HR:04 SN: JK1332004206 MD:08/10/2013)
+
+$apc_pattern = "/^APC .*\(MB:.* PF:(.*) PN:.* AF1:(.*) AN1:.* MN:(.*) HR:(.*) SN:(.*) MD:.*/";
+if (preg_match($apc_pattern, $poll_device['sysDescr'], $matches))
+{
+  $version  = $matches[1];
+  $features = "App " . $matches[2];
+  $hardware = $matches[3] . " " . $matches[4];
+  $serial   = trim($matches[5]);
+} 
+
+// EOF
