diff --git a/views/ngXosViews/diagnostic/env/onlab_pod.js b/views/ngXosViews/diagnostic/env/onlab_pod.js
index 413bd04..42211be 100644
--- a/views/ngXosViews/diagnostic/env/onlab_pod.js
+++ b/views/ngXosViews/diagnostic/env/onlab_pod.js
@@ -8,6 +8,6 @@
 
 module.exports = {
   host: 'http://10.90.0.132/',
-  xoscsrftoken: 'bDZaZNRDU6BwUanvjfcGfKJHohG3mlqb',
-  xossessionid: '3nww58wgrlscs7boy2xzw11tji8ywal5'
+  xoscsrftoken: 'JmfZETFs72GiVGxIJkCPSrybZvTtJLwF',
+  xossessionid: 'jmf3z9wat049cmrh91ppg37pn4yj3830'
 };
diff --git a/views/ngXosViews/diagnostic/src/js/chart_data_service.js b/views/ngXosViews/diagnostic/src/js/chart_data_service.js
index 19825a1..5d65b2b 100644
--- a/views/ngXosViews/diagnostic/src/js/chart_data_service.js
+++ b/views/ngXosViews/diagnostic/src/js/chart_data_service.js
@@ -203,8 +203,7 @@
 
         p = Tenant.queryVsgInstances(param[service.name]).$promise
         .then((instances) => {
-
-          return Ceilometer.getInstancesStats(instances);
+          return Ceilometer.getInstancesStats(lodash.uniq(instances));
         });
       }
 
diff --git a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
index 6ac0342..29972fb 100644
--- a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
+++ b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
@@ -315,19 +315,65 @@
 
       // NOTE this should be dinamically positioned
       // base on the number of element present
+
+      // fake the position
+      let translation = {
+        'mysite_vsg-1': '200, -120',
+        'mysite_vsg-2': '-300, 30',
+        'mysite_vsg-3': '-300, -250',
+      };
+
       const statsContainer = container.append('g')
         .attr({
-          transform: `translate(200, -120)`,
+          transform: `translate(${translation[instance.humanReadableName]})`,
           class: 'stats-container'
+        })
+        .on('click', function(d) {
+          // toggling visisbility
+          d.fade = !d.fade;
+          let opacity;
+          if(d.fade){
+            opacity = 0.1;
+          }
+          else{
+            opacity = 1;
+          }
+
+          d3.select(this)
+          .transition()
+          .duration(serviceTopologyConfig.duration)
+          .attr({
+            opacity: opacity
+          })
         });
 
-
-      statsContainer.append('line')
-        .attr({
+      let lines = {
+        'mysite_vsg-1': {
           x1: -160,
           y1: 120,
           x2: 0,
           y2: 50,
+        },
+        'mysite_vsg-2': {
+          x1: 250,
+          y1: 50,
+          x2: 300,
+          y2: -10
+        },
+        'mysite_vsg-3': {
+          x1: 250,
+          y1: 50,
+          x2: 300,
+          y2: 270
+        }
+      }
+
+      statsContainer.append('line')
+        .attr({
+          x1: d => lines[d.humanReadableName].x1,
+          y1: d => lines[d.humanReadableName].y1,
+          x2: d => lines[d.humanReadableName].x2,
+          y2: d => lines[d.humanReadableName].y2,
           stroke: 'black',
           opacity: 0
         })
@@ -345,7 +391,7 @@
         statsHeight += serviceTopologyConfig.container.height + (serviceTopologyConfig.container.margin * 2)
       }
 
-      statsContainer.append('rect')
+      const statsVignette = statsContainer.append('rect')
         .attr({
           width: statsWidth,
           height: statsHeight,
@@ -357,6 +403,7 @@
           opacity: 1
         });
 
+
       // add instance info
       statsContainer.append('text')
         .attr({
@@ -387,22 +434,27 @@
         })
 
       // add stats
-      const interestingMeters = ['memory', 'memory.usage', 'cpu', 'vcpus'];
+      const interestingMeters = ['memory', 'memory.usage', 'cpu', 'cpu_util'];
 
       interestingMeters.forEach((m, i) => {
         const meter = lodash.find(instance.stats, {meter: m});
-        statsContainer.append('text')
-        .attr({
-          y: 55 + (i * 15),
-          x: serviceTopologyConfig.instance.margin,
-          opacity: 0
-        })
-        .text(`${meter.description}: ${Math.round(meter.value)} ${meter.unit}`)
-        .transition()
-        .duration(serviceTopologyConfig.duration)
-        .attr({
-          opacity: 1
-        });
+
+        if(meter){
+          
+          statsContainer.append('text')
+          .attr({
+            y: 55 + (i * 15),
+            x: serviceTopologyConfig.instance.margin,
+            opacity: 0
+          })
+          .text(`${meter.description}: ${Math.round(meter.value)} ${meter.unit}`)
+          .transition()
+          .duration(serviceTopologyConfig.duration)
+          .attr({
+            opacity: 1
+          });
+        }
+
       });
 
       if(instance.container){
@@ -471,10 +523,10 @@
         }
       });
 
-      instanceContainer
-      .on('click', function(d){
-        console.log(`Draw vignette with stats for instance: ${d.name}`);
-      });
+      // instanceContainer
+      // .on('click', function(d){
+      //   console.log(`Draw vignette with stats for instance: ${d.name}`);
+      // });
     };
 
     this.addPhisical = (nodes) => {
diff --git a/xos/configurations/cord-pod/cdn/README.md b/xos/configurations/cord-pod/cdn/README.md
new file mode 100644
index 0000000..a7730f9
--- /dev/null
+++ b/xos/configurations/cord-pod/cdn/README.md
@@ -0,0 +1,67 @@
+## Set up a new CDN
+
+### CDN on VTN - headnode
+
+1. nova flavor-create --is-public true m1.cdnnode auto 8192 110 4
+2. in XOS create flavor m1.cdnnode and add to deployment
+
+### CDN on VTN - CMI
+
+1. Make sure plenty of glance space on ctl node
+2. Make sure plenty of instance space on compute nodes
+3. Install cmi-0.3.img into XOS images/ directory
+4. Install CentOS-6-cdnnode-0.3.img into XOS images/ directory
+5. Wait for these two images to be loaded into glance (check glance image-list for status)
+6. XOS UI: Add cmi and CentOS images to MyDeployment
+7. Run recipe xos/configurations/cord-pod/pod-cdn.yaml
+       * this will create mysite_cdn slice, cdn-public network, and add management and cdn-public networks to slice
+8. Instantiate CMI instance in mysite_cdn
+       * flavor: m1.large
+       * image: cmi-0.3.img
+9. edit configurations/cord-pod/cdn/cmi-settings.sh
+       * update COMPUTE_NODE and MGMT_IP to match CMI instance
+       * update NODE_KEY to match ssh key for root @ the compute node
+       * do not change VM_KEY; the pubkey is baked into the instance
+10. edit configurations/cord-pod/cdn/cmi.yaml
+       * update gateway_ip and gateway_mac to reflect public internet gateway CMI will use
+11. copy the keygen and allkeys.template to the private/ directory
+12. copy cmi_id_rsa
+13. run setup-cmi.sh
+       * this will SSH into the CMI and run setup, then modify some settings.
+       * it may take a long time, 10-20 minutes or more
+       * takeover script will be saved to takeovers/. Takeover script will be used in the next phase.
+
+### CDN on VTN - cdnnode
+
+1. Instantiate cdnnode instance in mysite_cdn
+       * flavor: m1.cdnnode
+       * CenOS-6-cdnnode-0.3.img
+2. Log into compute node and Attach disk
+       * virsh attach-disk <instance_name> /dev/sdc vdc --cache none
+       * (make sure this disk wasn't used anywhere else!)
+3. log into cdnnode VM
+       * make sure default gateway is good (check public connectivity)
+       * make sure arp table is good
+       * make sure CMI is reachable from cdnnode
+       * run takeover script that was created by the CMI 
+       * (I suggest commenting out the final reboot -f, and make sure the rest of it worked right before rebooting)
+       * Node will take a long time to install
+4. log into cdnnode
+       * to SSH into cdnnode, go into CMI, vserver coplc, cd /etc/planetlab, and use debug_ssh_key.rsa w/ root user
+       * check default gateway
+       * fix arp entry for default gateway
+
+### CDN on VTN - cmi part 2
+
+1. run setup-logicalinterfaces.sh
+
+### Test Commands
+
+* First, make sure the vSG is the only DNS server available in the test client. 
+* Second, make sure cdn_enable bit is set in CordSubscriber object for your vSG.
+* curl -L -vvvv http://downloads.onosproject.org/vm/onos-tutorial-1.1.0r220-ovf.zip > /dev/null
+* curl -L -vvvv http://onlab.vicci.org/onos-videos/Nov-planning-day1/Day1+00+Bill+-+Community+Growth.mp4 > /dev/null
+
+## Restart CDN after power-down
+
+To do...
diff --git a/xos/core/static/observer_status.js b/xos/core/static/observer_status.js
index cb4fb5b..c6cc570 100644
--- a/xos/core/static/observer_status.js
+++ b/xos/core/static/observer_status.js
@@ -11,6 +11,7 @@
                       icon = "/static/img/green-cloud.gif";
                   } else {
                       tooltip = "observer is offline";
+                      // icon = "/static/img/red-cloud.gif";
                       icon = "/static/img/green-cloud.gif";
                   }
 
diff --git a/xos/core/xoslib/static/js/xosDiagnostic.js b/xos/core/xoslib/static/js/xosDiagnostic.js
index 48ddac4..f36c8ed 100644
--- a/xos/core/xoslib/static/js/xosDiagnostic.js
+++ b/xos/core/xoslib/static/js/xosDiagnostic.js
@@ -1155,16 +1155,66 @@
 
       // NOTE this should be dinamically positioned
       // base on the number of element present
+
+      // fake the position
+      var translation = {
+        'mysite_vsg-1': '200, -120',
+        'mysite_vsg-2': '-300, 30',
+        'mysite_vsg-3': '-300, -250'
+      };
+
       var statsContainer = container.append('g').attr({
-        transform: 'translate(200, -120)',
+        transform: 'translate(' + translation[instance.humanReadableName] + ')',
         'class': 'stats-container'
+      }).on('click', function (d) {
+        // toggling visisbility
+        d.fade = !d.fade;
+        var opacity = undefined;
+        if (d.fade) {
+          opacity = 0.1;
+        } else {
+          opacity = 1;
+        }
+
+        d3.select(this).transition().duration(serviceTopologyConfig.duration).attr({
+          opacity: opacity
+        });
       });
 
+      var lines = {
+        'mysite_vsg-1': {
+          x1: -160,
+          y1: 120,
+          x2: 0,
+          y2: 50
+        },
+        'mysite_vsg-2': {
+          x1: 250,
+          y1: 50,
+          x2: 300,
+          y2: -10
+        },
+        'mysite_vsg-3': {
+          x1: 250,
+          y1: 50,
+          x2: 300,
+          y2: 270
+        }
+      };
+
       statsContainer.append('line').attr({
-        x1: -160,
-        y1: 120,
-        x2: 0,
-        y2: 50,
+        x1: function x1(d) {
+          return lines[d.humanReadableName].x1;
+        },
+        y1: function y1(d) {
+          return lines[d.humanReadableName].y1;
+        },
+        x2: function x2(d) {
+          return lines[d.humanReadableName].x2;
+        },
+        y2: function y2(d) {
+          return lines[d.humanReadableName].y2;
+        },
         stroke: 'black',
         opacity: 0
       }).transition().duration(serviceTopologyConfig.duration).attr({
@@ -1179,7 +1229,7 @@
         statsHeight += serviceTopologyConfig.container.height + serviceTopologyConfig.container.margin * 2;
       }
 
-      statsContainer.append('rect').attr({
+      var statsVignette = statsContainer.append('rect').attr({
         width: statsWidth,
         height: statsHeight,
         opacity: 0
@@ -1207,17 +1257,21 @@
       });
 
       // add stats
-      var interestingMeters = ['memory', 'memory.usage', 'cpu', 'vcpus'];
+      var interestingMeters = ['memory', 'memory.usage', 'cpu', 'cpu_util'];
 
       interestingMeters.forEach(function (m, i) {
         var meter = lodash.find(instance.stats, { meter: m });
-        statsContainer.append('text').attr({
-          y: 55 + i * 15,
-          x: serviceTopologyConfig.instance.margin,
-          opacity: 0
-        }).text(meter.description + ': ' + Math.round(meter.value) + ' ' + meter.unit).transition().duration(serviceTopologyConfig.duration).attr({
-          opacity: 1
-        });
+
+        if (meter) {
+
+          statsContainer.append('text').attr({
+            y: 55 + i * 15,
+            x: serviceTopologyConfig.instance.margin,
+            opacity: 0
+          }).text(meter.description + ': ' + Math.round(meter.value) + ' ' + meter.unit).transition().duration(serviceTopologyConfig.duration).attr({
+            opacity: 1
+          });
+        }
       });
 
       if (instance.container) {
@@ -1282,9 +1336,10 @@
         }
       });
 
-      instanceContainer.on('click', function (d) {
-        console.log('Draw vignette with stats for instance: ' + d.name);
-      });
+      // instanceContainer
+      // .on('click', function(d){
+      //   console.log(`Draw vignette with stats for instance: ${d.name}`);
+      // });
     };
 
     this.addPhisical = function (nodes) {
@@ -1923,8 +1978,7 @@
           };
 
           p = Tenant.queryVsgInstances(param[service.name]).$promise.then(function (instances) {
-
-            return Ceilometer.getInstancesStats(instances);
+            return Ceilometer.getInstancesStats(lodash.uniq(instances));
           });
         }
 
diff --git a/xos/synchronizers/vcpe/files/etc/service/message/run b/xos/synchronizers/vcpe/files/etc/service/message/run
index 59c2759..2f3b563 100755
--- a/xos/synchronizers/vcpe/files/etc/service/message/run
+++ b/xos/synchronizers/vcpe/files/etc/service/message/run
@@ -1,15 +1,20 @@
 #!/usr/bin/python
 
 import BaseHTTPServer
+
+
 class HTTPHandlerOne(BaseHTTPServer.BaseHTTPRequestHandler):
-  def do_GET(self):
-      with open('./message.html', 'r') as msgfile:
-          message = msgfile.read()
-      self.wfile.write(message)
+    def do_GET(self):
+        # with open('./message.html', 'r') as msgfile:
+        with open('../../../../templates/message.html.j2', 'r') as msgfile:
+            message = msgfile.read()
+        self.wfile.write(message)
+
 
 def run(server_class=BaseHTTPServer.HTTPServer,
         handler_class=BaseHTTPServer.BaseHTTPRequestHandler):
-    server_address = ('192.168.0.1', 8000)
+    # server_address = ('192.168.0.1', 8000)
+    server_address = ('127.0.0.1', 8000)
     httpd = server_class(server_address, handler_class)
     httpd.serve_forever()
 
