diff --git a/modules/plugins/hudson/src/main/java/org/rhq/plugins/hudson/HudsonProjectComponent.java b/modules/plugins/hudson/src/main/java/org/rhq/plugins/hudson/HudsonProjectComponent.java
index 4a831a8..a64f505 100644
--- a/modules/plugins/hudson/src/main/java/org/rhq/plugins/hudson/HudsonProjectComponent.java
+++ b/modules/plugins/hudson/src/main/java/org/rhq/plugins/hudson/HudsonProjectComponent.java
@@ -18,19 +18,24 @@
  */
 package org.rhq.plugins.hudson;
 
+import java.util.Date;
+import java.util.Set;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
-import org.rhq.core.domain.measurement.*;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
 import org.rhq.core.pluginapi.inventory.ResourceComponent;
 import org.rhq.core.pluginapi.inventory.ResourceContext;
 import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-
-import java.util.Date;
-import java.util.Set;
 
 /**
  * @author Greg Hinkle
@@ -40,7 +45,6 @@
     private static final Log LOG = LogFactory.getLog(HudsonProjectComponent.class);
 
     private ResourceContext<HudsonServerComponent> resourceContext;
-
 
     public void start(ResourceContext<HudsonServerComponent> hudsonServerComponentResourceContext) throws InvalidPluginConfigurationException, Exception {
         this.resourceContext = hudsonServerComponentResourceContext;
@@ -52,8 +56,7 @@
 
     public AvailabilityType getAvailability() {
         try {
-            JSONArray healthArray =
-                    this.resourceContext.getParentResourceComponent().getProjectHealth(this.resourceContext.getResourceKey());
+            JSONArray healthArray = this.resourceContext.getParentResourceComponent().getProjectHealth(this.resourceContext.getResourceKey());
             if (healthArray != null) {
                 JSONObject healthReport = healthArray.getJSONObject(0);
                 return (healthReport.getInt("score") == 100) ? AvailabilityType.UP : AvailabilityType.DOWN;
@@ -68,29 +71,35 @@
 
     public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {
         try {
+            long currentTime = System.currentTimeMillis();
+
             String path = this.resourceContext.getResourceKey();
             JSONObject job = HudsonJSONUtility.getData(path, 1);
 
-            JSONObject lastSuccessfulBuild = job.getJSONObject("lastSuccessfulBuild");
-            JSONObject lastBuild = job.getJSONObject("lastBuild");
-            JSONArray healthArray = job.getJSONArray("healthReport");
-            JSONObject healthReport = healthArray.getJSONObject(0);
+            JSONObject lastSuccessfulBuild = job.has("lastSuccessfulBuild") ? job.getJSONObject("lastSuccessfulBuild") : null;
+            JSONObject lastBuild = job.has("lastBuild") ? job.getJSONObject("lastBuild") : null;
+            JSONArray healthArray = job.has("healthReport") ? job.getJSONArray("healthReport") : null;
+            JSONObject healthReport = (healthArray != null && healthArray.length() > 0) ? healthArray.getJSONObject(0) : null;
 
             for (MeasurementScheduleRequest request : metrics) {
                 try {
-                    if (request.getName().equals("lastSuccessfulBuildNumber")) {
+                    if (request.getName().equals("lastSuccessfulBuildNumber") && lastSuccessfulBuild != null) {
                         report.addData(new MeasurementDataTrait(request, lastSuccessfulBuild.getString("number")));
-                    } else if (request.getName().equals("lastSuccessfulBuildTime")) {
+                    } else if (request.getName().equals("lastSuccessfulBuildTime") && lastSuccessfulBuild != null) {
                         report.addData(new MeasurementDataTrait(request, new Date(lastSuccessfulBuild.getLong("timestamp")).toString()));
-                    } else if (request.getName().equals("lastBuildNumber")) {
+                    } else if (request.getName().equals("lastSuccessfulBuildElapsedTime") && lastSuccessfulBuild != null) {
+                        report.addData(new MeasurementDataNumeric(request, (currentTime - lastSuccessfulBuild.getLong("timestamp")) / 1000d));
+                    } else if (request.getName().equals("lastBuildNumber") && lastBuild != null) {
                         report.addData(new MeasurementDataTrait(request, lastBuild.getString("number")));
-                    } else if (request.getName().equals("lastBuildTime")) {
+                    } else if (request.getName().equals("lastBuildTime") && lastBuild != null) {
                         report.addData(new MeasurementDataTrait(request, new Date(lastBuild.getLong("timestamp")).toString()));
-                    } else if (request.getName().equals("lastBuildResult")) {
+                    } else if (request.getName().equals("lastBuildElapsedTime") && lastBuild != null) {
+                        report.addData(new MeasurementDataNumeric(request, (currentTime - lastBuild.getLong("timestamp")) / 1000d));
+                    } else if (request.getName().equals("lastBuildResult") && lastBuild != null) {
                         report.addData(new MeasurementDataTrait(request, lastBuild.getString("result")));
-                    } else if (request.getName().equals("healthScore")) {
+                    } else if (request.getName().equals("healthScore") && healthReport != null) {
                         report.addData(new MeasurementDataNumeric(request, healthReport.getDouble("score") / 100d));
-                    } else if (request.getName().equals("lastBuildDuration")) {
+                    } else if (request.getName().equals("lastBuildDuration") && lastBuild != null) {
                         report.addData(new MeasurementDataNumeric(request, lastBuild.getDouble("duration")));
                     }
                 } catch (Exception e) {
diff --git a/modules/plugins/hudson/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/hudson/src/main/resources/META-INF/rhq-plugin.xml
index 472708e..2ca3dfd 100644
--- a/modules/plugins/hudson/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/hudson/src/main/resources/META-INF/rhq-plugin.xml
@@ -24,10 +24,12 @@
             <metric property="lastSuccessfulBuildNumber" dataType="trait" displayType="summary"/>
 
             <metric property="lastSuccessfulBuildTime" dataType="trait" units="epoch_milliseconds"/>
-
+            <metric property="lastSuccessfulBuildElapsedTime" units="seconds"/>
+            
             <metric property="lastBuildNumber" dataType="trait"/>
             <metric property="lastBuildTime" dataType="trait" units="epoch_milliseconds"/>
-
+            <metric property="lastBuildElapsedTime" units="seconds"/>
+            
 
             <metric property="lastBuildResult" dataType="trait" displayType="summary"/>
 