diff --git a/xos/synchronizer/manifest b/xos/synchronizer/manifest
index 8f43610..b4f7827 100644
--- a/xos/synchronizer/manifest
+++ b/xos/synchronizer/manifest
@@ -1,9 +1,14 @@
 manifest
+monitoring_agent/__init__.py
+monitoring_agent/monitoring_agent.py
+monitoring_agent/exampleservice_stats.py
+monitoring_agent/monitoring_agent.conf
 steps/sync_exampletenant.py
 steps/roles/install_apache/tasks/main.yml
 steps/roles/create_index/templates/index.html.j2
 steps/roles/create_index/tasks/main.yml
 steps/exampletenant_playbook.yaml
+steps/monitoring_agent.yaml
 exampleservice-synchronizer.py
 model-deps
 run.sh
diff --git a/xos/synchronizer/monitoring_agent/exampleservice_stats.py b/xos/synchronizer/monitoring_agent/exampleservice_stats.py
index 64843fd..896356b 100644
--- a/xos/synchronizer/monitoring_agent/exampleservice_stats.py
+++ b/xos/synchronizer/monitoring_agent/exampleservice_stats.py
@@ -39,30 +39,30 @@
     while line:
         line = line.strip()
         if "Total Accesses:" in line:
-            key = "total.accesses"
+            key = "exampleservice.apache.total.accesses"
             val  = {'val':int(line.strip("Total Accesses:")), 'unit':'accesses', 'metric_type':'gauge'}
         elif "Total kBytes:" in line:
-            key = "total.kBytes"
+            key = "exampleservice.apache.total.kBytes"
             val  = {'val':float(line.strip("Total kBytes:")), 'unit':'kBytes', 'metric_type':'gauge'}
         elif "Uptime:" in line:
-            key = "uptime"
+            key = "exampleservice.apache.uptime"
             val  = {'val':int(line.strip("Uptime:")), 'unit':'seconds', 'metric_type':'gauge'}
         elif "ReqPerSec:" in line:
-            key = "reqpersec"
+            key = "exampleservice.apache.reqpersec"
             val  = {'val':float(line.strip("ReqPerSec:")), 'unit':'rate', 'metric_type':'gauge'}
         elif "BytesPerSec:" in line:
-            key = "bytespersec"
+            key = "exampleservice.apache.bytespersec"
             val  = {'val':float(line.strip("BytesPerSec:")), 'unit':'rate', 'metric_type':'gauge'}
         elif "BytesPerReq:" in line:
-            key = "bytesperreq"
+            key = "exampleservice.apache.bytesperreq"
             val  = {'val':float(line.strip("BytesPerReq:")), 'unit':'rate', 'metric_type':'gauge'}
         elif "BusyWorkers:" in line:
-            key = "busyworkers"
+            key = "exampleservice.apache.busyworkers"
             val  = {'val':int(line.strip("BusyWorkers:")), 'unit':'workers', 'metric_type':'gauge'}
         elif "IdleWorkers:" in line:
-            key = "idleworkers"
+            key = "exampleservice.apache.idleworkers"
             val  = {'val':int(line.strip("IdleWorkers:")), 'unit':'workers', 'metric_type':'gauge'}
-   
+
         dictStatus[key] = val
         counter = counter + 1
         line = file.readline()
diff --git a/xos/synchronizer/monitoring_agent/monitoring_agent.py b/xos/synchronizer/monitoring_agent/monitoring_agent.py
index 1839ed5..19204b1 100644
--- a/xos/synchronizer/monitoring_agent/monitoring_agent.py
+++ b/xos/synchronizer/monitoring_agent/monitoring_agent.py
@@ -28,6 +28,7 @@
 @app.route('/monitoring/agent/exampleservice/start',methods=['POST'])
 def exampleservice_start_monitoring_agent():
     global start_publish, rabbit_user, rabbit_password, rabbit_host, rabbit_exchange
+    global keystone_tenant_id, keystone_user_id, publisher_id
     try:
         # To do validation of user inputs for all the functions
         target = request.json['target']
@@ -83,10 +84,10 @@
                  'publisher_id': publisher_id,
                  'timestamp':datetime.datetime.now().isoformat(),
                  'priority':'INFO',
-                 'payload': {'name':k,
-                             'unit':v['unit'],
-                             'result':v['val'],
-                             'type':v['metric_type'],
+                 'payload': {'counter_name':k,
+                             'counter_unit':v['unit'],
+                             'counter_volume':v['val'],
+                             'counter_type':v['metric_type'],
                              'resource_id':'exampleservice',
                              'user_id':keystone_user_id,
                              'tenant_id':keystone_tenant_id
@@ -103,7 +104,7 @@
     resParse = stats.parse_status_page()
     logging.debug ("publish:%(data)s" % {'data':resParse})
     publish_exampleservice_stats(resParse)
-    threading.Timer(5, periodic_publish).start()
+    threading.Timer(60, periodic_publish).start()
 
 if __name__ == "__main__":
     logging.config.fileConfig('monitoring_agent.conf', disable_existing_loggers=False)
diff --git a/xos/synchronizer/steps/monitoring_agent.yaml b/xos/synchronizer/steps/monitoring_agent.yaml
new file mode 100644
index 0000000..87cffde
--- /dev/null
+++ b/xos/synchronizer/steps/monitoring_agent.yaml
@@ -0,0 +1,61 @@
+---
+- hosts: {{ instance_name }}
+  gather_facts: False
+  connection: ssh
+  user: ubuntu
+  vars:
+      keystone_tenant_id: {{ keystone_tenant_id }}
+      keystone_user_id: {{ keystone_user_id }}
+      target_uri: {{ target_uri }}
+
+  tasks:
+  - name: Verify if monitoring_agent ([] is to avoid capturing the shell process) cron job is already running
+    shell: pgrep -f [m]onitoring_agent | wc -l
+    register: cron_job_pids_count
+
+  - name: DEBUG
+    debug: var=cron_job_pids_count.stdout
+
+  - name: make sure /usr/local/share/monitoring_agent exists
+    file: path=/usr/local/share/monitoring_agent state=directory owner=root group=root
+    become: yes
+    when: cron_job_pids_count.stdout == "0"
+
+  - name: Copy cron job to destination
+    copy: src=/opt/xos/synchronizers/exampleservice/monitoring_agent/
+      dest=/usr/local/share/monitoring_agent/
+    become: yes
+    when: cron_job_pids_count.stdout == "0"
+
+  - name: Installing python-pip
+    apt: name=python-pip state=present update_cache=yes
+    become: yes
+    when: cron_job_pids_count.stdout == "0"
+
+  - name: Installing Flask
+    pip: name=Flask
+    become: yes
+    when: cron_job_pids_count.stdout == "0"
+
+  - name: install python-kombu
+    apt: name=python-kombu state=present
+    become: yes
+    when: cron_job_pids_count.stdout == "0"
+
+  - name: Initiate monitoring agent cron job
+    command: python monitoring_agent.py &
+    async: 9999999999999999
+    poll: 0
+    become: yes
+    when: cron_job_pids_count.stdout == "0"
+    args:
+       chdir: /usr/local/share/monitoring_agent/
+
+  - name : starting monitoring agent
+    uri:
+      url: http://localhost:5004/monitoring/agent/exampleservice/start
+      method: POST
+      body: '{ "target":"{{target_uri}}", "keystone_user_id": "{{keystone_user_id}}", "keystone_tenant_id": "{{keystone_tenant_id}}" }'
+      force_basic_auth: yes
+      status_code: 200
+      body_format: json    
diff --git a/xos/synchronizer/steps/sync_exampletenant.py b/xos/synchronizer/steps/sync_exampletenant.py
index 80685e9..1b2f619 100644
--- a/xos/synchronizer/steps/sync_exampletenant.py
+++ b/xos/synchronizer/steps/sync_exampletenant.py
@@ -1,13 +1,16 @@
 import os
 import sys
 from django.db.models import Q, F
-from core.models import ModelLink, CoarseTenant
+from core.models import ModelLink, CoarseTenant, ServiceMonitoringAgentInfo
 from services.exampleservice.models import ExampleService, ExampleTenant
 from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+from xos.logger import Logger, logging
 
 parentdir = os.path.join(os.path.dirname(__file__), "..")
 sys.path.insert(0, parentdir)
 
+logger = Logger(level=logging.INFO)
+
 class SyncExampleTenant(SyncInstanceUsingAnsible):
 
     provides = [ExampleTenant]
@@ -20,7 +23,7 @@
 
     service_key_name = "/opt/xos/synchronizers/exampleservice/exampleservice_private_key"
 
-    watches = [ModelLink(CoarseTenant,via='coarsetenant')]
+    watches = [ModelLink(CoarseTenant,via='coarsetenant'), ModelLink(ServiceMonitoringAgentInfo,via='monitoringagentinfo')]
 
     def __init__(self, *args, **kwargs):
         super(SyncExampleTenant, self).__init__(*args, **kwargs)
@@ -61,3 +64,33 @@
         # when the instance holding the exampleservice is deleted.
         pass
 
+    def handle_service_monitoringagentinfo_watch_notification(self, monitoring_agent_info):
+        if not monitoring_agent_info.service:
+            logger.info("handle watch notifications for service monitoring agent info...ignoring because service attribute in monitoring agent info:%s is null" % (monitoring_agent_info))
+            return
+
+        if not monitoring_agent_info.target_uri:
+            logger.info("handle watch notifications for service monitoring agent info...ignoring because target_uri attribute in monitoring agent info:%s is null" % (monitoring_agent_info))
+            return
+
+        objs = ExampleTenant.get_tenant_objects().all()
+        for obj in objs:
+            if obj.provider_service.id != monitoring_agent_info.service.id:
+                logger.info("handle watch notifications for service monitoring agent info...ignoring because service attribute in monitoring agent info:%s is not matching" % (monitoring_agent_info))
+                return
+
+            instance = self.get_instance(obj)
+            if not instance:
+               logger.warn("handle watch notifications for service monitoring agent info...: No valid instance found for object %s" % (str(obj)))
+               return
+
+            logger.info("handling watch notification for monitoring agent info:%s for ExampleTenant object:%s" % (monitoring_agent_info, obj))
+
+            #Run ansible playbook to update the routing table entries in the instance
+            fields = self.get_ansible_fields(instance)
+            fields["ansible_tag"] =  obj.__class__.__name__ + "_" + str(obj.id) + "_monitoring"
+            fields["target_uri"] = monitoring_agent_info.target_uri
+
+            template_name = "monitoring_agent.yaml"
+            super(SyncExampleTenant, self).run_playbook(obj, fields, template_name)
+        pass
