diff --git a/xos/admin.py b/xos/admin.py
index b2a9242..fdc7e46 100644
--- a/xos/admin.py
+++ b/xos/admin.py
@@ -10,7 +10,7 @@
 from django.utils import timezone
 from django.contrib.contenttypes import generic
 from suit.widgets import LinkedSelect
-from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline, TenantAttrAsTabInline
+from core.admin import XOSBaseAdmin,ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline, TenantAttrAsTabInline, UploadTextareaWidget
 from core.middleware import get_request
 
 from functools import update_wrapper
@@ -59,6 +59,18 @@
 
     suit_form_includes = (('ceilometeradmin.html', 'top', 'administration'),
                            )
+    #actions=['delete_selected_objects']
+
+    #def get_actions(self, request):
+    #    actions = super(CeilometerServiceAdmin, self).get_actions(request)
+    #    if 'delete_selected' in actions:
+    #        del actions['delete_selected']
+    #    return actions
+
+    #def delete_selected_objects(self, request, queryset):
+    #    for obj in queryset:
+    #        obj.delete()
+    #delete_selected_objects.short_description = "Delete Selected Ceilometer Service Objects"
 
     def get_queryset(self, request):
         return CeilometerService.get_service_objects_by_user(request.user)
@@ -100,18 +112,18 @@
     form = MonitoringChannelForm
 
     suit_form_tabs = (('general','Details'),)
-    actions=['delete_selected_objects']
+    #actions=['delete_selected_objects']
 
-    def get_actions(self, request):
-        actions = super(MonitoringChannelAdmin, self).get_actions(request)
-        if 'delete_selected' in actions:
-            del actions['delete_selected']
-        return actions
+    #def get_actions(self, request):
+    #    actions = super(MonitoringChannelAdmin, self).get_actions(request)
+    #    if 'delete_selected' in actions:
+    #        del actions['delete_selected']
+    #    return actions
 
-    def delete_selected_objects(self, request, queryset):
-        for obj in queryset:
-            obj.delete()
-    delete_selected_objects.short_description = "Delete Selected MonitoringChannel Objects"
+    #def delete_selected_objects(self, request, queryset):
+    #    for obj in queryset:
+    #        obj.delete()
+    #delete_selected_objects.short_description = "Delete Selected MonitoringChannel Objects"
 
     def get_queryset(self, request):
         return MonitoringChannel.get_tenant_objects_by_user(request.user)
@@ -211,8 +223,204 @@
     def get_queryset(self, request):
         return SFlowTenant.get_tenant_objects_by_user(request.user)
 
+class OpenStackServiceMonitoringPublisherForm(forms.ModelForm):
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+
+    def __init__(self,*args,**kwargs):
+        super (OpenStackServiceMonitoringPublisherForm,self ).__init__(*args,**kwargs)
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['provider_service'].queryset = CeilometerService.get_service_objects().all()
+        if self.instance:
+            # fields for the attributes
+            self.fields['creator'].initial = self.instance.creator
+        if (not self.instance) or (not self.instance.pk):
+            # default fields for an 'add' form
+            self.fields['kind'].initial = CEILOMETER_PUBLISH_TENANT_OS_KIND
+            self.fields['creator'].initial = get_request().user
+            if CeilometerService.get_service_objects().exists():
+               self.fields["provider_service"].initial = CeilometerService.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get("creator")
+        return super(OpenStackServiceMonitoringPublisherForm, self).save(commit=commit)
+
+    class Meta:
+        model = OpenStackServiceMonitoringPublisher
+        fields = '__all__'
+
+class OpenStackServiceMonitoringPublisherAdmin(ReadOnlyAwareAdmin):
+    list_display = ('backend_status_icon', 'id', )
+    list_display_links = ('backend_status_icon', 'id')
+    fieldsets = [ (None, {'fields': ['backend_status_text', 'kind', 'provider_service', 'service_specific_attribute', 'creator'],
+                          'classes':['suit-tab suit-tab-general']})]
+    readonly_fields = ('backend_status_text', 'service_specific_attribute' )
+    form = OpenStackServiceMonitoringPublisherForm
+
+    suit_form_tabs = (('general','Details'),)
+    actions=['delete_selected_objects']
+
+    def get_actions(self, request):
+        actions = super(OpenStackServiceMonitoringPublisherAdmin, self).get_actions(request)
+        if 'delete_selected' in actions:
+            del actions['delete_selected']
+        return actions
+
+    def delete_selected_objects(self, request, queryset):
+        for obj in queryset:
+            obj.delete()
+    delete_selected_objects.short_description = "Delete Selected OpenStackServiceMonitoringPublisher Objects"
+
+    def get_queryset(self, request):
+        return OpenStackServiceMonitoringPublisher.get_tenant_objects_by_user(request.user)
+
+class ONOSServiceMonitoringPublisherForm(forms.ModelForm):
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+    onos_service_endpoints = forms.CharField(max_length=1024, help_text="IP addresses of all the ONOS services to be monitored")
+
+    def __init__(self,*args,**kwargs):
+        super (ONOSServiceMonitoringPublisherForm,self ).__init__(*args,**kwargs)
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['provider_service'].queryset = CeilometerService.get_service_objects().all()
+        if self.instance:
+            # fields for the attributes
+            self.fields['creator'].initial = self.instance.creator
+            self.fields['onos_service_endpoints'].initial = self.instance.onos_service_endpoints
+        if (not self.instance) or (not self.instance.pk):
+            # default fields for an 'add' form
+            self.fields['kind'].initial = CEILOMETER_PUBLISH_TENANT_ONOS_KIND
+            self.fields['creator'].initial = get_request().user
+            if CeilometerService.get_service_objects().exists():
+               self.fields["provider_service"].initial = CeilometerService.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get("creator")
+        self.instance.onos_service_endpoints = self.cleaned_data.get("onos_service_endpoints")
+        return super(ONOSServiceMonitoringPublisherForm, self).save(commit=commit)
+
+    class Meta:
+        model = ONOSServiceMonitoringPublisher
+        fields = '__all__'
+
+class ONOSServiceMonitoringPublisherAdmin(ReadOnlyAwareAdmin):
+    list_display = ('backend_status_icon', 'id', )
+    list_display_links = ('backend_status_icon', 'id')
+    fieldsets = [ (None, {'fields': ['backend_status_text', 'kind', 'provider_service', 'service_specific_attribute', 'creator', 'onos_service_endpoints'],
+                          'classes':['suit-tab suit-tab-general']})]
+    readonly_fields = ('backend_status_text', 'service_specific_attribute' )
+    form = ONOSServiceMonitoringPublisherForm
+
+    suit_form_tabs = (('general','Details'),)
+    actions=['delete_selected_objects']
+
+    def get_actions(self, request):
+        actions = super(ONOSServiceMonitoringPublisherAdmin, self).get_actions(request)
+        if 'delete_selected' in actions:
+            del actions['delete_selected']
+        return actions
+
+    def delete_selected_objects(self, request, queryset):
+        for obj in queryset:
+            obj.delete()
+    delete_selected_objects.short_description = "Delete Selected OpenStackServiceMonitoringPublisher Objects"
+
+    def get_queryset(self, request):
+        return ONOSServiceMonitoringPublisher.get_tenant_objects_by_user(request.user)
+
+class UserServiceMonitoringPublisherForm(forms.ModelForm):
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+    exclude_service_list = ['ceilometer', 'onos', 'VTN', 'vROUTER', 'vOLT', 'vTR']
+    target_service = forms.ModelChoiceField(queryset=Service.objects.all().exclude(kind__in=exclude_service_list))
+
+    def __init__(self,*args,**kwargs):
+        super (UserServiceMonitoringPublisherForm,self ).__init__(*args,**kwargs)
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['provider_service'].queryset = CeilometerService.get_service_objects().all()
+        if self.instance:
+            # fields for the attributes
+            self.fields['creator'].initial = self.instance.creator
+            self.fields['target_service'].initial = self.instance.target_service
+        if (not self.instance) or (not self.instance.pk):
+            # default fields for an 'add' form
+            self.fields['kind'].initial = CEILOMETER_PUBLISH_TENANT_USER_KIND
+            self.fields['creator'].initial = get_request().user
+            if CeilometerService.get_service_objects().exists():
+               self.fields["provider_service"].initial = CeilometerService.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get("creator")
+        self.instance.target_service = self.cleaned_data.get("target_service")
+        return super(UserServiceMonitoringPublisherForm, self).save(commit=commit)
+
+    class Meta:
+        model = UserServiceMonitoringPublisher
+        fields = '__all__'
+
+class UserServiceMonitoringPublisherAdmin(ReadOnlyAwareAdmin):
+    list_display = ('backend_status_icon', 'id', )
+    list_display_links = ('backend_status_icon', 'id')
+    fieldsets = [ (None, {'fields': ['backend_status_text', 'kind', 'provider_service', 'service_specific_attribute', 'creator', 'target_service'],
+                          'classes':['suit-tab suit-tab-general']})]
+    readonly_fields = ('backend_status_text', 'service_specific_attribute' )
+    form = UserServiceMonitoringPublisherForm
+
+    suit_form_tabs = (('general','Details'),)
+    actions=['delete_selected_objects']
+
+    def get_actions(self, request):
+        actions = super(UserServiceMonitoringPublisherAdmin, self).get_actions(request)
+        if 'delete_selected' in actions:
+            del actions['delete_selected']
+        return actions
+
+    def delete_selected_objects(self, request, queryset):
+        for obj in queryset:
+            obj.delete()
+    delete_selected_objects.short_description = "Delete Selected UserServiceMonitoringPublisher Objects"
+
+    def get_queryset(self, request):
+        return UserServiceMonitoringPublisher.get_tenant_objects_by_user(request.user)
+
+class InfraMonitoringAgentInfoForm(forms.ModelForm):
+    class Meta:
+        model = InfraMonitoringAgentInfo
+        widgets = {
+            'start_url_json_data': UploadTextareaWidget(attrs={'rows': 5, 'cols': 80, 'class': "input-xxlarge"}),
+        }
+        fields = '__all__'
+
+class InfraMonitoringAgentInfoAdmin(XOSBaseAdmin):
+    list_display = ('backend_status_icon', 'name', 'id', )
+    list_display_links = ('backend_status_icon', 'name', 'id')
+    fieldsets = [ (None, {'fields': ['name', 'start_url', 'start_url_json_data', 'stop_url', 'monitoring_publisher'],
+                          'classes':['suit-tab suit-tab-general']})]
+    form = InfraMonitoringAgentInfoForm
+
+    suit_form_tabs = (('general','Details'),)
+
+class MonitoringCollectorPluginInfoForm(forms.ModelForm):
+    class Meta:
+        model = MonitoringCollectorPluginInfo
+        #widgets = {
+        #    'plugin_notification_handlers_json': UploadTextareaWidget(attrs={'rows': 5, 'cols': 80, 'class': "input-xxlarge"}),
+        #}
+        fields = '__all__'
+
+class MonitoringCollectorPluginInfoAdmin(XOSBaseAdmin):
+    list_display = ('backend_status_icon', 'name', 'id', )
+    list_display_links = ('backend_status_icon', 'name', 'id')
+    fieldsets = [ (None, {'fields': ['name', 'plugin_folder_path', 'plugin_rabbit_exchange', 'monitoring_publisher'],
+                          'classes':['suit-tab suit-tab-general']})]
+    form = MonitoringCollectorPluginInfoForm
+
+    suit_form_tabs = (('general','Details'),)
+
 admin.site.register(CeilometerService, CeilometerServiceAdmin)
 admin.site.register(SFlowService, SFlowServiceAdmin)
 admin.site.register(MonitoringChannel, MonitoringChannelAdmin)
 admin.site.register(SFlowTenant, SFlowTenantAdmin)
+admin.site.register(OpenStackServiceMonitoringPublisher, OpenStackServiceMonitoringPublisherAdmin)
+admin.site.register(ONOSServiceMonitoringPublisher, ONOSServiceMonitoringPublisherAdmin)
+admin.site.register(UserServiceMonitoringPublisher, UserServiceMonitoringPublisherAdmin)
+admin.site.register(InfraMonitoringAgentInfo, InfraMonitoringAgentInfoAdmin)
+admin.site.register(MonitoringCollectorPluginInfo, MonitoringCollectorPluginInfoAdmin)
 
diff --git a/xos/models.py b/xos/models.py
index 0960152..cf7a23b 100644
--- a/xos/models.py
+++ b/xos/models.py
@@ -1,5 +1,6 @@
 from django.db import models
-from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber
+from django.core.validators import URLValidator
+from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber, CoarseTenant, ServiceMonitoringAgentInfo
 from core.models.plcorebase import StrippedCharField
 import os
 from django.db import models, transaction
@@ -13,6 +14,11 @@
 from urlparse import urlparse
 
 CEILOMETER_KIND = "ceilometer"
+#Ensure the length of name for 'kind' attribute is below 30
+CEILOMETER_PUBLISH_TENANT_KIND = "ceilo-publish-tenant"
+CEILOMETER_PUBLISH_TENANT_OS_KIND = "ceilo-os-publish-tenant"
+CEILOMETER_PUBLISH_TENANT_ONOS_KIND = "ceilo-onos-publish-tenant"
+CEILOMETER_PUBLISH_TENANT_USER_KIND = "ceilo-user-publish-tenant"
 
 class CeilometerService(Service):
     KIND = CEILOMETER_KIND
@@ -113,8 +119,48 @@
             return self.get_controller().admin_tenant
         return 'admin'
 
+    @property
+    def ceilometer_rabbit_compute_node(self):
+        if not self.get_instance():
+            return None
+        return self.get_instance().node.name
+
+    @property
+    def ceilometer_rabbit_host(self):
+        if not self.get_instance():
+            return None
+        return self.nat_ip
+
+    @property
+    def ceilometer_rabbit_user(self):
+        if not self.get_instance():
+            return None
+        return 'openstack'
+
+    @property
+    def ceilometer_rabbit_password(self):
+        if not self.get_instance():
+            return None
+        return 'password'
+
+    @property
+    def ceilometer_rabbit_uri(self):
+        if not self.get_instance():
+            return None
+        if not self.private_ip:
+            return None
+        return 'rabbit://openstack:password@' + self.private_ip + ':5672'
+
+    def delete(self, *args, **kwargs):
+        instance = self.get_instance()
+        if instance:
+            instance.delete()
+        super(CeilometerService, self).delete(*args, **kwargs)
+
+
 class MonitoringChannel(TenantWithContainer):   # aka 'CeilometerTenant'
     class Meta:
+        app_label = "monitoring"
         proxy = True
 
     KIND = CEILOMETER_KIND
@@ -151,7 +197,7 @@
 
         if self.pk is None:
             #Allow only one monitoring channel per user
-            channel_count = sum ( [1 for channel in MonitoringChannel.objects.filter(kind=CEILOMETER_KIND) if (channel.creator == self.creator)] )
+            channel_count = sum ( [1 for channel in MonitoringChannel.get_tenant_objects().all() if (channel.creator == self.creator)] )
             if channel_count > 0:
                 raise XOSValidationError("Already %s channels exist for user Can only create max 1 MonitoringChannel instance per user" % str(channel_count))
 
@@ -293,6 +339,256 @@
         mc = mc[0]
         mc.manage_container()
 
+#@receiver(models.signals.post_delete, sender=MonitoringChannel)
+#def cleanup_monitoring_channel(sender, o, *args, **kwargs):
+#     #o.cleanup_container()
+#     #Temporary change only, remove the below code after testing
+#     if o.instance:
+#         o.instance.delete()
+#         o.instance = None
+
+class MonitoringPublisher(Tenant):
+    class Meta:
+        app_label = "monitoring"
+        proxy = True
+
+    KIND = CEILOMETER_PUBLISH_TENANT_KIND
+
+    default_attributes = {}
+    def __init__(self, *args, **kwargs):
+        ceilometer_services = CeilometerService.get_service_objects().all()
+        if ceilometer_services:
+            self._meta.get_field("provider_service").default = ceilometer_services[0].id
+        super(MonitoringPublisher, self).__init__(*args, **kwargs)
+
+    def can_update(self, user):
+        #Allow creation of this model instances for non-admin users also
+        return True
+
+    @property
+    def creator(self):
+        from core.models import User
+        if getattr(self, "cached_creator", None):
+            return self.cached_creator
+        creator_id=self.get_attribute("creator_id")
+        if not creator_id:
+            return None
+        users=User.objects.filter(id=creator_id)
+        if not users:
+            return None
+        user=users[0]
+        self.cached_creator = users[0]
+        return user
+
+    @creator.setter
+    def creator(self, value):
+        if value:
+            value = value.id
+        if (value != self.get_attribute("creator_id", None)):
+            self.cached_creator=None
+        self.set_attribute("creator_id", value)
+
+class OpenStackServiceMonitoringPublisher(MonitoringPublisher):
+    class Meta:
+        app_label = "monitoring"
+        proxy = True
+
+    KIND = CEILOMETER_PUBLISH_TENANT_OS_KIND
+
+    def __init__(self, *args, **kwargs):
+        super(OpenStackServiceMonitoringPublisher, self).__init__(*args, **kwargs)
+
+    def can_update(self, user):
+        #Don't allow creation of this model instances for non-admin users also
+        return False
+
+    def save(self, *args, **kwargs):
+        if not self.creator:
+            if not getattr(self, "caller", None):
+                # caller must be set when creating a monitoring channel since it creates a slice
+                raise XOSProgrammingError("OpenStackServiceMonitoringPublisher's self.caller was not set")
+            self.creator = self.caller
+            if not self.creator:
+                raise XOSProgrammingError("OpenStackServiceMonitoringPublisher's self.creator was not set")
+
+        if self.pk is None:
+            #Allow only one openstack monitoring publisher per admin user
+            publisher_count = sum ( [1 for ospublisher in OpenStackServiceMonitoringPublisher.get_tenant_objects().all() if (ospublisher.creator == self.creator)] )
+            if publisher_count > 0:
+                raise XOSValidationError("Already %s openstack publishers exist for user Can only create max 1 OpenStackServiceMonitoringPublisher instance per user" % str(publisher_count))
+
+        super(OpenStackServiceMonitoringPublisher, self).save(*args, **kwargs)
+
+class ONOSServiceMonitoringPublisher(MonitoringPublisher):
+    class Meta:
+        app_label = "monitoring"
+        proxy = True
+
+    KIND = CEILOMETER_PUBLISH_TENANT_ONOS_KIND
+
+    def __init__(self, *args, **kwargs):
+        super(ONOSServiceMonitoringPublisher, self).__init__(*args, **kwargs)
+
+    def can_update(self, user):
+        #Don't allow creation of this model instances for non-admin users also
+        return False
+
+    def save(self, *args, **kwargs):
+        if not self.creator:
+            if not getattr(self, "caller", None):
+                # caller must be set when creating a monitoring channel since it creates a slice
+                raise XOSProgrammingError("ONOSServiceMonitoringPublisher's self.caller was not set")
+            self.creator = self.caller
+            if not self.creator:
+                raise XOSProgrammingError("ONOSServiceMonitoringPublisher's self.creator was not set")
+
+        if self.pk is None:
+            #Allow only one openstack monitoring publisher per admin user
+            publisher_count = sum ( [1 for onospublisher in ONOSServiceMonitoringPublisher.get_tenant_objects().all() if (onospublisher.creator == self.creator)] )
+            if publisher_count > 0:
+                raise XOSValidationError("Already %s openstack publishers exist for user Can only create max 1 ONOSServiceMonitoringPublisher instance per user" % str(publisher_count))
+
+        super(ONOSServiceMonitoringPublisher, self).save(*args, **kwargs)
+
+class UserServiceMonitoringPublisher(MonitoringPublisher):
+    class Meta:
+        app_label = "monitoring"
+        proxy = True
+
+    KIND = CEILOMETER_PUBLISH_TENANT_USER_KIND
+
+    def __init__(self, *args, **kwargs):
+        self.cached_target_service = None
+        self.cached_tenancy_from_target_service = None
+        self.cached_service_monitoring_agent = None
+        super(UserServiceMonitoringPublisher, self).__init__(*args, **kwargs)
+
+    def can_update(self, user):
+        #Don't allow creation of this model instances for non-admin users also
+        return True
+
+    @property
+    def target_service(self):
+        if getattr(self, "cached_target_service", None):
+            return self.cached_target_service
+        target_service_id = self.get_attribute("target_service_id")
+        if not target_service_id:
+            return None
+        services = Service.objects.filter(id=target_service_id)
+        if not services:
+            return None
+        target_service = services[0]
+        self.cached_target_service = target_service
+        return target_service
+
+    @target_service.setter
+    def target_service(self, value):
+        if value:
+            value = value.id
+        if (value != self.get_attribute("target_service_id", None)):
+            self.cached_target_service = None
+        self.set_attribute("target_service_id", value)
+
+    @property
+    def tenancy_from_target_service(self):
+        if getattr(self, "cached_tenancy_from_target_service", None):
+            return self.cached_tenancy_from_target_service
+        tenancy_from_target_service_id = self.get_attribute("tenancy_from_target_service_id")
+        if not tenancy_from_target_service_id:
+            return None
+        tenancy_from_target_services = CoarseTenant.objects.filter(id=tenancy_from_target_service_id)
+        if not tenancy_from_target_services:
+            return None
+        tenancy_from_target_service = tenancy_from_target_services[0]
+        self.cached_tenancy_from_target_service = tenancy_from_target_service
+        return tenancy_from_target_service
+
+    @tenancy_from_target_service.setter
+    def tenancy_from_target_service(self, value):
+        if value:
+            value = value.id
+        if (value != self.get_attribute("tenancy_from_target_service_id", None)):
+            self.cached_tenancy_from_target_service = None
+        self.set_attribute("tenancy_from_target_service_id", value)
+
+    @property
+    def service_monitoring_agent(self):
+        if getattr(self, "cached_service_monitoring_agent", None):
+            return self.cached_service_monitoring_agent
+        service_monitoring_agent_id = self.get_attribute("service_monitoring_agent")
+        if not service_monitoring_agent_id:
+            return None
+        service_monitoring_agents = CoarseTenant.objects.filter(id=service_monitoring_agent_id)
+        if not service_monitoring_agents:
+            return None
+        service_monitoring_agent = service_monitoring_agents[0]
+        self.cached_service_monitoring_agent = service_monitoring_agent
+        return service_monitoring_agent
+
+    @service_monitoring_agent.setter
+    def service_monitoring_agent(self, value):
+        if value:
+            value = value.id
+        if (value != self.get_attribute("service_monitoring_agent", None)):
+            self.cached_service_monitoring_agent = None
+        self.set_attribute("service_monitoring_agent", value)
+
+    def save(self, *args, **kwargs):
+        if not self.creator:
+            if not getattr(self, "caller", None):
+                # caller must be set when creating a monitoring channel since it creates a slice
+                raise XOSProgrammingError("UserServiceMonitoringPublisher's self.caller was not set")
+            self.creator = self.caller
+            if not self.creator:
+                raise XOSProgrammingError("UserServiceMonitoringPublisher's self.creator was not set")
+
+        tenancy_from_target_service = None
+        if self.pk is None:
+            if self.target_service is None:
+                raise XOSValidationError("Target service is not specified in UserServiceMonitoringPublisher")
+            #Allow only one monitoring publisher for a given service 
+            publisher_count = sum ( [1 for publisher in UserServiceMonitoringPublisher.get_tenant_objects().all() if (publisher.target_service.id == self.target_service.id)] )
+            if publisher_count > 0:
+                raise XOSValidationError("Already %s publishers exist for service. Can only create max 1 UserServiceMonitoringPublisher instances" % str(publisher_count))
+            #Create Service composition object here
+            tenancy_from_target_service = CoarseTenant(provider_service = self.provider_service,
+                                                   subscriber_service = self.target_service)
+            tenancy_from_target_service.save()
+            self.tenancy_from_target_service = tenancy_from_target_service
+
+            target_uri = CeilometerService.objects.get(id=self.provider_service.id).ceilometer_rabbit_uri
+            if target_uri is None:
+                raise XOSProgrammingError("Unable to get the Target_URI for Monitoring Agent")
+            service_monitoring_agent = ServiceMonitoringAgentInfo(service = self.target_service,
+                                                               target_uri = target_uri)
+            service_monitoring_agent.save()
+            self.service_monitoring_agent = service_monitoring_agent
+        
+        try:
+            super(UserServiceMonitoringPublisher, self).save(*args, **kwargs)
+        except:
+            if tenancy_from_target_service:
+                tenancy_from_target_service.delete()
+            if service_monitoring_agent:
+                service_monitoring_agent.delete()
+            raise
+
+class InfraMonitoringAgentInfo(ServiceMonitoringAgentInfo):
+    class Meta:
+        app_label = "monitoring"
+    start_url = models.TextField(validators=[URLValidator()], help_text="URL/API to be used to start monitoring agent")
+    start_url_json_data = models.TextField(help_text="Metadata to be passed along with start API")
+    stop_url = models.TextField(validators=[URLValidator()], help_text="URL/API to be used to stop monitoring agent")
+    monitoring_publisher = models.ForeignKey(MonitoringPublisher, related_name="monitoring_agents", null=True, blank=True)
+
+class MonitoringCollectorPluginInfo(PlCoreBase):
+    class Meta:
+        app_label = "monitoring"
+    name = models.CharField(max_length=32)
+    plugin_folder_path = StrippedCharField(blank=True, null=True, max_length=1024, help_text="Path pointing to plugin files. e.g. /opt/xos/synchronizers/monitoring/ceilometer/ceilometer-plugins/network/ext_services/vsg/")
+    plugin_rabbit_exchange = StrippedCharField(blank=True, null=True, max_length=100) 
+    #plugin_notification_handlers_json = models.TextField(blank=True, null=True, help_text="Dictionary of notification handler classes. e.g {\"name\":\"plugin handler main class\"}")
+    monitoring_publisher = models.OneToOneField(MonitoringPublisher, related_name="monitoring_collector_plugin", null=True, blank=True)
 
 SFLOW_KIND = "sflow"
 SFLOW_PORT = 6343
@@ -402,7 +698,7 @@
 
         if self.pk is None:
             #Allow only one sflow channel per user and listening_endpoint
-            channel_count = sum ( [1 for channel in SFlowTenant.objects.filter(kind=SFLOW_KIND) if ((channel.creator == self.creator) and (channel.listening_endpoint == self.listening_endpoint))] )
+            channel_count = sum ( [1 for channel in SFlowTenant.get_tenant_objects().all() if ((channel.creator == self.creator) and (channel.listening_endpoint == self.listening_endpoint))] )
             if channel_count > 0:
                 raise XOSValidationError("Already %s sflow channels exist for user Can only create max 1 tenant per user and listening endpoint" % str(channel_count))
 
diff --git a/xos/monitoring-onboard.yaml b/xos/monitoring-onboard.yaml
index 65ef2da..21a6174 100644
--- a/xos/monitoring-onboard.yaml
+++ b/xos/monitoring-onboard.yaml
@@ -18,7 +18,8 @@
           admin_template: templates/ceilometeradmin.html, templates/sflowadmin.html
           synchronizer: synchronizer/manifest
           synchronizer_run: monitoring_synchronizer.py
-          tosca_resource: tosca/resources/ceilometerservice.py, tosca/resources/ceilometertenant.py, tosca/resources/sflowservice.py
+          tosca_custom_types: monitoring_tosca_types.yaml
+          tosca_resource: tosca/resources/ceilometerservice.py, tosca/resources/ceilometertenant.py, tosca/resources/sflowservice.py, tosca/resources/openstackmonitoringpublisher.py, tosca/resources/onosmonitoringpublisher.py, tosca/resources/userservicemonitoringpublisher.py, tosca/resources/inframonitoringagentinfo.py, tosca/resources/monitoringcollectorplugininfo.py 
           rest_tenant: subdirectory:monitoring api/tenant/monitoring/monitoringchannel.py, subdirectory:monitoring/dashboard api/tenant/monitoring/dashboard/ceilometerdashboard.py
           private_key: file:///opt/xos/key_import/monitoringservice_rsa
           public_key: file:///opt/xos/key_import/monitoringservice_rsa.pub
diff --git a/xos/monitoring_tosca_types.yaml b/xos/monitoring_tosca_types.yaml
new file mode 100644
index 0000000..928bb2c
--- /dev/null
+++ b/xos/monitoring_tosca_types.yaml
@@ -0,0 +1,243 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+# compile this with "m4 monitoring_custom_tosca_types.m4 > monitoring_custom_tosca_types.yaml"
+
+# include macros
+# Note: Tosca derived_from isn't working the way I think it should, it's not
+#    inheriting from the parent template. Until we get that figured out, use
+#    m4 macros do our inheritance
+
+
+# Service
+
+
+# Subscriber
+
+
+
+
+# end m4 macros
+
+
+
+node_types:
+    tosca.nodes.SFlowService:
+        derived_from: tosca.nodes.Root
+        description: >
+            XOS SFlow Collection Service
+        capabilities:
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service
+        properties:
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.
+            sflow_port:
+              type: integer
+              required: false
+              default: 6343
+              description: sFlow listening port
+            sflow_api_port:
+              type: integer
+              required: false
+              default: 33333
+              description: sFlow publish subscribe api listening port
+
+    tosca.nodes.CeilometerService:
+        derived_from: tosca.nodes.Root
+        description: >
+            XOS Ceilometer Service
+        capabilities:
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service
+        properties:
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.
+            ceilometer_pub_sub_url:
+                type: string
+                required: false
+                description: REST URL of ceilometer PUB/SUB component
+
+    tosca.nodes.CeilometerTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            CORD: A Tenant of the Ceilometer Service.
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+
+    tosca.nodes.InfraMonitoringAgentInfo:
+        derived_from: tosca.nodes.Root
+        description: >
+            Infra Monitoring agent info
+        capabilities:
+            inframonitoringagentinfo:
+                type: tosca.capabilities.xos.InfraMonitoringAgentInfo
+        properties:
+            start_url:
+                type: string
+                required: true
+                description: REST URL to be invoked to start monitoring agent
+            start_url_json_data:
+                type: string
+                required: false
+                description: Meta data to be sent along with start API
+            stop_url:
+                type: string
+                required: true
+                description: REST URL to be invoked to stop monitoring agent
+
+    tosca.relationships.ProvidesInfraMonitoringAgentInfo:
+        derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.InfraMonitoringAgentInfo ]
+
+    tosca.capabilities.xos.InfraMonitoringAgentInfo:
+        derived_from: tosca.capabilities.Root
+        description: An XOS Infra MonitoringAgentInfo
+
+    tosca.nodes.MonitoringCollectorPluginInfo:
+        derived_from: tosca.nodes.Root
+        description: >
+            Monitoring collector plugin info
+        capabilities:
+            monitoringcollectorplugininfo:
+                type: tosca.capabilities.xos.MonitoringCollectorPluginInfo
+        properties:
+            plugin_folder_path:
+                type: string
+                required: true
+                description: Folder path pointing to plugin files. 
+            plugin_rabbit_exchange:
+                type: string
+                required: true
+                description: RabbitMQ exchange used by Monitoring collector notification plugin
+
+    tosca.relationships.ProvidesMonitoringCollectorPluginInfo:
+        derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.MonitoringCollectorPluginInfo ]
+
+    tosca.capabilities.xos.MonitoringCollectorPluginInfo:
+        derived_from: tosca.capabilities.Root
+        description: An XOS MonitoringCollectorPluginInfo
+
+    tosca.nodes.OpenStackMonitoringPublisher:
+        derived_from: tosca.nodes.Root
+        description: >
+            A OpenStack Publish Tenant of the Monitoring service
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+
+    tosca.nodes.ONOSMonitoringPublisher:
+        derived_from: tosca.nodes.Root
+        description: >
+            A ONOS Publish Tenant of the Monitoring service
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+
+    tosca.relationships.PublishesMonitoringData:
+        derived_from: tosca.relationships.Root
+        valid_target_types: [ tosca.capabilities.xos.Service ]
+
+    tosca.nodes.UserServiceMonitoringPublisher:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Publish Tenant of the Monitoring service user defined services
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/README b/xos/synchronizer/ceilometer/monitoring_agent/README
new file mode 100644
index 0000000..c367075
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/README
@@ -0,0 +1,9 @@
+Sample curl commands to test Monitoring agent:
+---------------------------------------------
+curl -i -H "Content-Type: application/json" -X POST -d '{"target":"udp://9.9.9.9:4455", "meta_data": { "resources": ["onos://10.11.10.60:8181?auth=basic&user=onos&password=rocks&scheme=http","onos://10.11.10.61:8181?auth=basic&user=onos&password=rocks&scheme=http"]}}' -L http://nova-compute-1:5004/monitoring/agent/onos/start
+
+curl -i -H "Content-Type: application/json" -X POST -d '{"target":"udp://9.9.9.9:4455"}' -L http://nova-compute-1:5004/monitoring/agent/openstack/start
+
+curl -i -H "Content-Type: application/json" -X POST -d '{"target":"udp://9.9.9.9:4455"}' -L http://nova-compute-1:5004/monitoring/agent/openstack/stop
+
+curl -i -H "Content-Type: application/json" -X POST -d '{"target":"udp://9.9.9.9:4455", "meta_data": { "resources": ["onos://10.11.10.60:8181?auth=basic&user=onos&password=rocks&scheme=http","onos://10.11.10.61:8181?auth=basic&user=onos&password=rocks&scheme=http"]}}' -L http://nova-compute-1:5004/monitoring/agent/onos/stop
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/ceilometer_config.yaml b/xos/synchronizer/ceilometer/monitoring_agent/ceilometer_config.yaml
new file mode 100644
index 0000000..9d36bcb
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/ceilometer_config.yaml
@@ -0,0 +1,79 @@
+---
+- hosts: '{{ instance_name }}'
+  gather_facts: False
+  connection: ssh
+  user: ubuntu
+  sudo: yes
+
+  tasks:
+
+  - name: Installing python-dev
+    apt: name=python-dev state=present update_cache=yes
+
+  - name: Installing Flask
+    pip: name=Flask
+
+  - name: Verify if  ([monitoring_agent] is to avoid capturing the shell process) is already running
+    shell: pgrep -f [m]onitoring_agent | wc -l
+    register: monitoringagent_job_pids_count
+
+  - name: DEBUG
+    debug: var=monitoringagent_job_pids_count.stdout
+
+  - name: stop /usr/local/share/monitoring_agent if already running
+    shell: pkill -f /usr/local/share/monitoring_agent/monitoring_agent.py
+    ignore_errors: True
+    when:  monitoringagent_job_pids_count.stdout !=  "0"
+
+  - name: Deleting monitoring agent folder(if already exists)
+    file: path=/usr/local/share/monitoring_agent state=absent owner=root group=root
+
+  - name: make sure /usr/local/share/monitoring_agent exists
+    file: path=/usr/local/share/monitoring_agent state=directory owner=root group=root
+
+  - name: Copying monitoring agent conf file
+    when : "'ceilometer' in instance_name"
+    set_fact: ceilometer_services="ceilometer-agent-central,ceilometer-agent-notification,ceilometer-collector,ceilometer-api"
+
+  - name: Copying monitoring agent conf file
+    when : "'ceilometer' not in instance_name"
+    set_fact: ceilometer_services="ceilometer-agent-compute"
+
+  - name : DEBUG
+    debug: var=ceilometer_services
+
+  - name: Copying monitoring agent conf file  
+    template: src=monitoring_agent.conf.j2 dest=/usr/local/share/monitoring_agent/monitoring_agent.conf  mode=0777 
+
+  - name: Copying file to /usr/local/share
+    copy: src=monitoring_agent.py dest=/usr/local/share/monitoring_agent/monitoring_agent.py mode=0777
+
+  - name: Copying file to /usr/local/share
+    copy: src=generate_pipeline.py dest=/usr/local/share/monitoring_agent/generate_pipeline.py mode=0777
+
+  - name: Copying file to /usr/local/share
+    copy: src=pipeline.yaml.j2 dest=/usr/local/share/monitoring_agent/pipeline.yaml.j2 mode=0777
+ 
+  - name: Copying file to /usr/local/share
+    copy: src=start_monitoring_agent.sh dest=/usr/local/share/monitoring_agent/start_monitoring_agent.sh mode=0777
+
+  - name: Starting monitoring agent
+    command: nohup python /usr/local/share/monitoring_agent/monitoring_agent.py &
+    args:
+       chdir: /usr/local/share/monitoring_agent/
+    async: 9999999999999999
+    poll: 0
+ 
+  - name: Configuring monitoring agent
+    shell: /usr/local/share/monitoring_agent/start_monitoring_agent.sh
+
+#TODO: 
+#Copy ONOS notification handlers 
+#from ~/xos_services/monitoring/xos/synchronizer/ceilometer/ceilometer-plugins/network/statistics/onos
+#to /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/onos in the headnode ceilometer node
+#Copy a file from ~/xos_services/monitoring/xos/synchronizer/ceilometer/ceilometer-plugins/network/statistics/__init__.py
+#to /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/ folder 
+#Also, update the entry_points.txt with the following changes:
+#[network.statistics.drivers]
+#....
+#onos = ceilometer.network.statistics.onos.driver:ONOSDriver
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/disable_monitoring_service.yaml b/xos/synchronizer/ceilometer/monitoring_agent/disable_monitoring_service.yaml
new file mode 100644
index 0000000..4f4bc7f
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/disable_monitoring_service.yaml
@@ -0,0 +1,23 @@
+---
+- hosts: '{{ instance_name }}'
+  gather_facts: False
+  connection: ssh
+  user: ubuntu
+  sudo: yes
+  tasks:
+  - name : stopping onos service on {{ instance_name }}
+    uri:
+      url: http://{{ instance_name }}:5004/monitoring/agent/onos/stop
+      method: POST
+      body: '"target":"udp://9.9.9.9:4455", "meta_data": { "resources": ["onos://10.11.10.60:8181?auth=basic&user=onos&password=rocks&scheme=http","onos://10.11.10.61:8181?auth=basic&user=onos&password=rocks&scheme=http"]} '
+      force_basic_auth: yes
+      status_code: 200
+      body_format: json
+  - name:  stopping openstack service on {{ instance_name }}
+    uri:
+      url: http://{{ instance_name }}:5004/monitoring/agent/openstack/stop
+      method: POST
+      body: '"target":"udp://9.9.9.9:4455"'
+      force_basic_auth: yes
+      status_code: 200
+      body_format: json
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/enable_monitoring_service.yaml b/xos/synchronizer/ceilometer/monitoring_agent/enable_monitoring_service.yaml
new file mode 100644
index 0000000..f4d4de5
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/enable_monitoring_service.yaml
@@ -0,0 +1,24 @@
+---
+- hosts: '{{ instance_name }}'
+  gather_facts: False
+  connection: ssh
+  user: ubuntu
+  sudo: yes
+  tasks:
+  - name : starting onos service on {{ instance_name }}
+    uri:
+      url: http://{{ instance_name }}:5004/monitoring/agent/onos/start
+      method: POST
+      body: '{ "target":"udp://9.9.9.9:4455", "meta_data": { "resources": ["onos://10.11.10.60:8181?auth=basic&user=onos&password=rocks&scheme=http","onos://10.11.10.61:8181?auth=basic&user=onos&password=rocks&scheme=http"]}} '
+      force_basic_auth: yes
+      status_code: 200
+      body_format: json    
+  - name:  starting openstack service on {{ instance_name }}
+    uri: 
+      url: http://{{ instance_name }}:5004/monitoring/agent/openstack/start
+      method: POST
+      body: '"target":"udp://9.9.9.9:4455"'
+      force_basic_auth: yes
+      status_code: 200
+      body_format: json
+
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/generate_pipeline.py b/xos/synchronizer/ceilometer/monitoring_agent/generate_pipeline.py
new file mode 100644
index 0000000..beab6d6
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/generate_pipeline.py
@@ -0,0 +1,125 @@
+from jinja2 import Environment, FileSystemLoader
+from urlparse import urlparse
+import os
+
+# Capture our current directory
+THIS_DIR = os.path.dirname(os.path.abspath(__file__))
+
+openstack_service_info=[]
+onos_service_info=[]
+class Openstack_Service():
+   def __init__(self,service_name,target):
+      self.service_name=service_name
+      self.target=target
+      self.service_enable=True
+   def update_openstack_service_info(self):
+       if not openstack_service_info:
+           openstack_service_info.append(self)
+       else:
+           for obj in openstack_service_info:
+               openstack_service_info.remove(obj)
+           openstack_service_info.append(self)
+           #openstack_service_info[0].target.append(target)
+         
+class Onos_Service():
+   def __init__(self,service_name,target,resources):
+      self.service_name=service_name
+      self.target=target
+      self.resources=resources
+      self.service_enable=True
+   def update_onos_service_info(self):
+       if not onos_service_info:
+          onos_service_info.append(self)
+       else:
+           for obj in onos_service_info:
+               onos_service_info.remove(obj)
+           onos_service_info.append(self)
+          #onos_service_info[0].target.append(target)
+
+def generate_pipeline_yaml_for_openstack(target,Flag):
+    # Create the jinja2 environment.
+    # Notice the use of trim_blocks, which greatly helps control whitespace.
+    op_service=Openstack_Service("OPENSTACK",target)
+    op_service.update_openstack_service_info() 
+    parse_target=urlparse(target)
+    host = parse_target.hostname
+    port =  parse_target.port
+    with open("pipeline.yaml", 'w') as f:
+        j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
+                         trim_blocks=True)
+        context = {
+             'openstack' : Flag, 
+             'listen_ip_addr': host,
+             'port_number' : port
+        }
+        fp = j2_env.get_template('pipeline.yaml.j2').render (
+            context)
+        f.write(fp)
+
+def generate_pipeline_yaml_for_onos(target,resources,Flag):
+     
+    onos_service=Onos_Service("ONOS",target,resources)
+    onos_service.update_onos_service_info() 
+    with open("pipeline.yaml", 'w') as f:
+        j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
+                         trim_blocks=True)
+        context = {
+             'onos' : Flag,
+             'onos_endpoints' : resources,
+             'onos_target' : target,
+             'new_line': '\n',
+             'new_tab': '      '    
+        }
+        fp = j2_env.get_template('pipeline.yaml.j2').render (
+            context)
+        f.write(fp)
+
+def generate_pipeline_yaml_for_openstack_onos(target,Flag):
+
+    op_service=Openstack_Service("OPENSTACK",target)
+    op_service.update_openstack_service_info() 
+    parse_target=urlparse(target)
+    host = parse_target.hostname
+    port =  parse_target.port
+    with open("pipeline.yaml", 'w') as f:
+        j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
+                         trim_blocks=True)
+        context = {
+             'openstack' : Flag, 
+             'listen_ip_addr': host,
+             'port_number' : port,
+             'onos' : Flag,
+             'onos_endpoints' : onos_service_info[0].resources,
+             'onos_target' : onos_service_info[0].target,
+             'new_line': '\n',
+             'new_tab': '      '
+        }
+        fp = j2_env.get_template('pipeline.yaml.j2').render (
+            context)
+        f.write(fp)
+
+def generate_pipeline_yaml_for_onos_openstack(target,resources,Flag):
+
+    onos_service=Onos_Service("ONOS",target,resources)
+    onos_service.update_onos_service_info() 
+ 
+    parse_target=urlparse(openstack_service_info[0].target)
+    host = parse_target.hostname
+    port =  parse_target.port
+   
+    with open("pipeline.yaml", 'w') as f:
+        j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
+                         trim_blocks=True)
+        context = {
+             'onos' : Flag,
+             'onos_endpoints' : resources,
+             'onos_target' : target,
+             'new_line': '\n',
+             'new_tab': '      ',
+             'openstack' : Flag,
+             'listen_ip_addr': host,
+             'port_number' : port
+        }
+        fp = j2_env.get_template('pipeline.yaml.j2').render (
+            context)
+        f.write(fp)
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/install_monitoring_ceilometer.sh b/xos/synchronizer/ceilometer/monitoring_agent/install_monitoring_ceilometer.sh
new file mode 100755
index 0000000..8cec15f
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/install_monitoring_ceilometer.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+#set -x 
+COMPUTENODES=$( bash -c "source ~/service-profile/cord-pod/admin-openrc.sh ; nova hypervisor-list" |grep "cord.lab"|awk '{print $4}')
+
+echo $COMPUTENODES
+
+for NODE in $COMPUTENODES; do
+    ansible-playbook -i /etc/maas/ansible/pod-inventory ~/xos_services/monitoring/xos/synchronizer/ceilometer/monitoring_agent/ceilometer_config.yaml -e instance_name=$NODE
+done
+
+CEILOMETERNODE="ceilometer-1"
+ansible-playbook ~/xos_services/monitoring/xos/synchronizer/ceilometer/monitoring_agent/ceilometer_config.yaml -e instance_name=$CEILOMETERNODE
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/monitoring_agent.py b/xos/synchronizer/ceilometer/monitoring_agent/monitoring_agent.py
new file mode 100644
index 0000000..5128d50
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/monitoring_agent.py
@@ -0,0 +1,140 @@
+#!/usr/bin/python
+from flask import request, Request, jsonify
+from flask import Flask
+from flask import make_response
+import logging
+import logging.handlers
+import logging.config
+import subprocess
+import ConfigParser
+import generate_pipeline
+app = Flask(__name__)
+
+
+@app.route('/monitoring/agent/openstack/start',methods=['POST'])
+def openstack_start():
+    try:
+        # To do validation of user inputs for all the functions
+        target = request.json['target']
+        logging.debug("target:%s",target)
+        if not generate_pipeline.onos_service_info:
+            logging.debug (" ONOS Service is not enalble,Only openstack need to be enabled ")
+            generate_pipeline.generate_pipeline_yaml_for_openstack(target,True)
+        else:
+            logging.debug(" ONOS Service is also enabled ,please generate yaml file for both onos and openstack")
+            generate_pipeline.generate_pipeline_yaml_for_openstack_onos(target,True)
+        restart_ceilometer_services() 
+        return "Openstack start service called \n"
+    except Exception as e:
+            return e.__str__()
+
+@app.route('/monitoring/agent/onos/start',methods=['POST'])
+def onos_start():
+    try:
+        target = request.json['target']
+        logging.debug("target:%s",target)
+        metadata = request.json['meta_data'] 
+        logging.debug("metadata:%s",metadata)
+        logging.debug(type(target))
+        resources = metadata['resources']
+        logging.debug("resources:%s",resources)
+        if not generate_pipeline.openstack_service_info:
+            logging.debug("Openstak Service is not enabled,Only ONOS need to be enabled")
+            generate_pipeline.generate_pipeline_yaml_for_onos(target,resources,True)
+        else:
+            logging.debug(" Openstack Service is also enabled ,please generate yaml file for both onos and openstack")
+            generate_pipeline.generate_pipeline_yaml_for_onos_openstack(target,resources,True)
+
+        restart_ceilometer_services() 
+        return "ONOS start service called \n"
+    except Exception as e:
+            return e.__str__()
+
+@app.route('/monitoring/agent/vsg/start',methods=['POST'])
+def vsg_start():
+    try:
+        target = request.json['target']
+        logging.debug("target:%s",target)
+        return "vsg start service called \n"
+    except Exception as e:
+            return e.__str__()
+
+
+@app.route('/monitoring/agent/openstack/stop',methods=['POST'])
+def openstack_stop():
+    try:
+        target = request.json['target']
+        logging.debug("target:%s",target)
+        if not generate_pipeline.onos_service_info:
+             generate_pipeline.generate_pipeline_yaml_for_openstack(target,False)
+        else:
+             generate_pipeline.generate_pipeline_yaml_for_onos(generate_pipeline.onos_service_info[0].target,generate_pipeline.onos_service_info[0].resources,True)
+        logging.debug("Delete Openstack object")
+        for obj in generate_pipeline.openstack_service_info:
+               generate_pipeline.openstack_service_info.remove(obj)
+   
+        restart_ceilometer_services() 
+        return "Openstack stop service called \n"
+      
+    except Exception as e:
+            return e.__str__()
+
+@app.route('/monitoring/agent/onos/stop',methods=['POST'])
+def onos_stop():
+    try:
+        target = request.json['target']
+        logging.debug("target:%s",target)
+        metadata = request.json['meta_data'] 
+        logging.debug("metadata:%s",metadata)
+        resources = metadata['resources']
+        logging.debug("resources:%s",resources)
+         
+        if not generate_pipeline.openstack_service_info:
+             generate_pipeline.generate_pipeline_yaml_for_onos(target,resources,False)
+        else:
+            generate_pipeline.generate_pipeline_yaml_for_openstack(generate_pipeline.openstack_service_info[0].target,True)
+
+        logging.debug("Delete ONOS Object")
+        for obj in generate_pipeline.onos_service_info:
+               generate_pipeline.onos_service_info.remove(obj)
+
+        restart_ceilometer_services() 
+        return "ONOS stop service called \n"
+    except Exception as e:
+            return e.__str__()
+
+@app.route('/monitoring/agent/vsg/stop',methods=['POST'])
+def vsg_stop():
+    try:
+        target = request.json['target']
+        logging.debug("target:%s",target)
+        return "vsg stop service called \n"
+    except Exception as e:
+            return e.__str__()
+
+
+def restart_ceilometer_services():
+    try :
+       config = ConfigParser.ConfigParser()
+       config.read('monitoring_agent.conf')
+       services = config.get('SERVICE','Ceilometer_service')
+       service = services.split(",")
+       subprocess.call("sudo cp pipeline.yaml /etc/ceilometer/pipeline.yaml",shell=True)
+    except Exception as e:
+        logging.error("* Error in confing file:%s",e.__str__())
+        return False
+    else :
+        for service_name in service:
+            command = ['service',service_name, 'restart'];
+            logging.debug("Executing: %s command",command)
+            #shell=FALSE for sudo to work.
+            try :
+                subprocess.call(command, shell=False)
+            except Exception as e:
+                logging.error("* %s command execution failed with error %s",command,e.__str__())
+                return False
+    return True
+
+if __name__ == "__main__":
+    logging.config.fileConfig('monitoring_agent.conf', disable_existing_loggers=False)
+    app.run(host="0.0.0.0",port=5004,debug=False)
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/pipeline.yaml.j2 b/xos/synchronizer/ceilometer/monitoring_agent/pipeline.yaml.j2
new file mode 100644
index 0000000..977847b
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/pipeline.yaml.j2
@@ -0,0 +1,110 @@
+---
+sources:
+    - name: meter_source
+      interval: 600
+      meters:
+          - "*"
+      sinks:
+          - meter_sink
+    - name: cpu_source
+      interval: 600
+      meters:
+          - "cpu"
+      sinks:
+          - cpu_sink
+    - name: disk_source
+      interval: 600
+      meters:
+          - "disk.read.bytes"
+          - "disk.read.requests"
+          - "disk.write.bytes"
+          - "disk.write.requests"
+          - "disk.device.read.bytes"
+          - "disk.device.read.requests"
+          - "disk.device.write.bytes"
+          - "disk.device.write.requests"
+      sinks:
+          - disk_sink
+    - name: network_source
+      interval: 600
+      meters:
+          - "network.incoming.bytes"
+          - "network.incoming.packets"
+          - "network.outgoing.bytes"
+          - "network.outgoing.packets"
+      sinks:
+          - network_sink
+{% if onos %}
+    - name: sdn_source1
+      interval: 600
+      meters:
+          - "switch"
+          - "switch.*"
+      resources: {{ new_line }}
+{%- for urls in onos_endpoints %}
+          - {{ urls }} {{ new_line}}
+{%- if loop.last -%}
+{{ new_tab }}sinks:
+         - sdn_sink
+{%- endif -%}
+{%- endfor -%}
+{% endif %} 
+sinks:
+    - name: meter_sink
+      transformers:
+      publishers:
+          - notifier://
+{% if openstack %}
+          - udp://{{ listen_ip_addr }}:{{ port_number }}
+{% endif %}
+    - name: cpu_sink
+      transformers:
+          - name: "rate_of_change"
+            parameters:
+                target:
+                    name: "cpu_util"
+                    unit: "%"
+                    type: "gauge"
+                    scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
+      publishers:
+          - notifier://
+{% if openstack %}
+          - udp://{{ listen_ip_addr }}:4455
+{% endif %}
+    - name: disk_sink
+      transformers:
+          - name: "rate_of_change"
+            parameters:
+                source:
+                    map_from:
+                        name: "(disk\\.device|disk)\\.(read|write)\\.(bytes|requests)"
+                        unit: "(B|request)"
+                target:
+                    map_to:
+                        name: "\\1.\\2.\\3.rate"
+                        unit: "\\1/s"
+                    type: "gauge"
+      publishers:
+          - notifier://
+    - name: network_sink
+      transformers:
+          - name: "rate_of_change"
+            parameters:
+                source:
+                   map_from:
+                       name: "network\\.(incoming|outgoing)\\.(bytes|packets)"
+                       unit: "(B|packet)"
+                target:
+                    map_to:
+                        name: "network.\\1.\\2.rate"
+                        unit: "\\1/s"
+                    type: "gauge"
+      publishers:
+          - notifier://
+{% if onos %}
+    - name: sdn_sink
+      transformers:
+      publishers:
+          - notifier://
+          - {{ onos_target }}
+{% endif %}
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/start_monitoring_agent.sh b/xos/synchronizer/ceilometer/monitoring_agent/start_monitoring_agent.sh
new file mode 100755
index 0000000..f7dedc2
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/start_monitoring_agent.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+sudo apt-get update
+sudo apt-get install -y python-dev
+sudo pip install Flask
+cd /home/ubuntu/monitoring_agent
+chmod +x monitoring_agent.py
+nohup python monitoring_agent.py &
diff --git a/xos/synchronizer/ceilometer/monitoring_agent/templates/monitoring_agent.conf.j2 b/xos/synchronizer/ceilometer/monitoring_agent/templates/monitoring_agent.conf.j2
new file mode 100755
index 0000000..dc7da38
--- /dev/null
+++ b/xos/synchronizer/ceilometer/monitoring_agent/templates/monitoring_agent.conf.j2
@@ -0,0 +1,25 @@
+[SERVICE]
+Ceilometer_service = {{ ceilometer_services }}
+
+
+[loggers]
+keys=root
+
+[handlers]
+keys=logfile
+
+[formatters]
+keys=logfileformatter
+
+[logger_root]
+level=DEBUG
+handlers=logfile
+
+[formatter_logfileformatter]
+format='%(asctime)s %(filename)s %(levelname)s %(message)s'
+
+[handler_logfile]
+class=handlers.RotatingFileHandler
+level=NOTSET
+args=('monitoring_agent.log','a',10000000,5)
+formatter=logfileformatter
diff --git a/xos/synchronizer/ceilometer/udp_proxy/udpagent.py b/xos/synchronizer/ceilometer/udp_proxy/udpagent.py
index 81826ad..1cac784 100644
--- a/xos/synchronizer/ceilometer/udp_proxy/udpagent.py
+++ b/xos/synchronizer/ceilometer/udp_proxy/udpagent.py
@@ -39,6 +39,10 @@
         event_data = {'event_type': 'infra','message_id':six.text_type(uuid.uuid4()),'publisher_id': 'cpe_publisher_id','timestamp':datetime.datetime.now().isoformat(),'priority':'INFO','payload':msg}
         return event_data
    
+    def errback(self, exc, interval):
+        logging.error('Error: %r', exc, exc_info=1)
+        logging.info('Retry in %s seconds.', interval)
+
     def setup_rabbit_mq_channel(self):
         service_exchange = Exchange(self.acord_control_exchange, "topic", durable=False)
         # connections/channels
@@ -47,6 +51,8 @@
         channel = connection.channel()
         # produce
         self.producer = Producer(channel, exchange=service_exchange, routing_key='notifications.info')
+        self.publish = connection.ensure(self.producer, self.producer.publish, errback=self.errback, max_retries=3)
+
 
     def start_udp(self):
         address_family = socket.AF_INET
@@ -70,12 +76,16 @@
             else:
                 try:
                     if sample.has_key("event_type"):
-                         logging.debug("recevied event  :%s",sample)
-                         self.producer.publish(sample)
+                         #logging.debug("recevied event  :%s",sample)
+                         logging.debug("recevied event  :%s",sample['event_type'])
+                         #self.producer.publish(sample)
+                         self.publish(sample)
                     else:
-                         logging.debug("recevied Sample  :%s",sample)
+                         #logging.debug("recevied Sample  :%s",sample)
+                         logging.debug("recevied Sample :%s",sample['counter_name'])
                          msg = self.convert_sample_to_event_data(sample)
-                         self.producer.publish(msg)
+                         #self.producer.publish(msg)
+                         self.publish(msg)
                 except Exception:
                     logging.exception("UDP: Unable to publish msg")
        
diff --git a/xos/synchronizer/manifest b/xos/synchronizer/manifest
index 9b9e144..f002ef4 100644
--- a/xos/synchronizer/manifest
+++ b/xos/synchronizer/manifest
@@ -12,6 +12,12 @@
 templates/ceilometer_proxy_server.py
 templates/start_ceilometer_proxy
 templates/update-keystone-endpoints.py.j2
+ceilometer/udp_proxy/udpagent.py
+templates/udpagent.conf.j2
+ceilometer/ceilometer-plugins/network/ext_services/openstack_infra/notifications.py
+ceilometer/ceilometer-plugins/network/ext_services/openstack_infra/__init__.py
+ceilometer/ceilometer-plugins/network/ext_services/vcpe/notifications.py
+ceilometer/ceilometer-plugins/network/ext_services/vcpe/__init__.py
 manifest
 run.sh
 monitoring_synchronizer_config
@@ -23,6 +29,9 @@
 steps/sync_sflowservice.py
 steps/sync_ceilometerservice.yaml
 steps/sync_ceilometerservice.py
+steps/sync_openstackmonitoringpublisher.py
+steps/sync_openstackmonitoringpublisher.yaml
+steps/enable_monitoring_service.yaml
 files/vm-resolv.conf
 files/docker.list
 model-deps
diff --git a/xos/synchronizer/steps/enable_monitoring_service.yaml b/xos/synchronizer/steps/enable_monitoring_service.yaml
new file mode 100644
index 0000000..de03646
--- /dev/null
+++ b/xos/synchronizer/steps/enable_monitoring_service.yaml
@@ -0,0 +1,27 @@
+---
+- hosts: 127.0.0.1
+  connection: local
+  gather_facts: False
+  user: ubuntu
+  vars:
+    monitoringagents: 
+        {% for agent in agents %}
+        - url: {{ agent.url }}
+          body: {{ agent.body }}
+        {% endfor %}
+
+  tasks:
+  - name: debug
+    debug: msg=" {{ '{{' }} item {{ '}}' }} "
+    with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
+    
+  - name:  starting openstack service monitoring agent
+    uri: 
+      url: "{{ '{{' }} item.url {{ '}}' }}"
+      method: POST
+      body: "{{ '{{' }} item.body {{ '}}' }}"
+      force_basic_auth: yes
+      status_code: 200
+      body_format: json
+    with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
+
diff --git a/xos/synchronizer/steps/sync_monitoringchannel.py b/xos/synchronizer/steps/sync_monitoringchannel.py
index 3b97741..fcb6f17 100644
--- a/xos/synchronizer/steps/sync_monitoringchannel.py
+++ b/xos/synchronizer/steps/sync_monitoringchannel.py
@@ -23,6 +23,10 @@
 
 logger = Logger(level=logging.INFO)
 
+#FIXME: Is this right approach?
+#Maintaining a global SSH tunnel database in order to handle tunnel deletions during the object delete
+ssh_tunnel_db = {}
+
 class SSHTunnel:
 
     def __init__(self, localip, localport, key, remoteip, remote_port, jumpuser, jumphost):
@@ -147,7 +151,7 @@
            #Check if ssh tunnel is needed
            proxy_ssh = getattr(Config(), "observer_proxy_ssh", False)
 
-           if proxy_ssh:
+           if proxy_ssh and (not o.ssh_proxy_tunnel):
                proxy_ssh_key = getattr(Config(), "observer_proxy_ssh_key", None)
                proxy_ssh_user = getattr(Config(), "observer_proxy_ssh_user", "root")
                jump_hostname = fields["hostname"]
@@ -159,16 +163,12 @@
                local_port = remote_port
                local_ip = socket.gethostbyname(socket.gethostname())
 
-#               tunnel = SSHTunnelForwarder(jump_hostname,
-#                                      ssh_username=proxy_ssh_user,
-#                                      ssh_pkey=proxy_ssh_key,
-#                                      ssh_private_key_password="",
-#                                      remote_bind_address=(remote_host,remote_port),
-#                                      local_bind_address=(local_ip,local_port),
-#                                      set_keepalive=300)
-#               tunnel.start()
                tunnel = SSHTunnel(local_ip, local_port, proxy_ssh_key, remote_host, remote_port, proxy_ssh_user, jump_hostname)
                tunnel.start()
+               logger.info("SSH Tunnel created for Monitoring channel-%s at local port:%s"%(o.id,local_port))
+
+               #FIXME:Store the tunnel handle in global tunnel database
+               ssh_tunnel_db[o.id] = tunnel
 
                #Update the model with ssh tunnel info
                o.ssh_proxy_tunnel = True
@@ -185,6 +185,14 @@
         #if quick_update:
         #    logger.info("quick_update triggered; skipping ansible recipe")
         #else:
+        if ('delete' in fields) and (fields['delete']):
+            logger.info("Delete for Monitoring channel-%s is getting synchronized"%(o.id))
+            if o.id in ssh_tunnel_db:
+                tunnel = ssh_tunnel_db[o.id]
+                tunnel.stop()
+                logger.info("Deleted SSH Tunnel for Monitoring channel-%s at local port:%s"%(o.id,o.ssh_tunnel_port))
+                o.ssh_proxy_tunnel = False
+                del ssh_tunnel_db[o.id]
         super(SyncMonitoringChannel, self).run_playbook(o, fields)
 
         #o.last_ansible_hash = ansible_hash
diff --git a/xos/synchronizer/steps/sync_openstackmonitoringpublisher.py b/xos/synchronizer/steps/sync_openstackmonitoringpublisher.py
new file mode 100644
index 0000000..2c3d74d
--- /dev/null
+++ b/xos/synchronizer/steps/sync_openstackmonitoringpublisher.py
@@ -0,0 +1,123 @@
+import hashlib
+import os
+import socket
+import sys
+import base64
+import time
+import json
+#import threading
+import subprocess
+import random
+import tempfile
+#from sshtunnel import SSHTunnelForwarder
+from django.db.models import F, Q
+from xos.config import Config
+from synchronizers.base.syncstep import SyncStep
+from synchronizers.base.ansible import run_template
+from synchronizers.base.ansible import run_template_ssh
+from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+from core.models import Service, Slice
+from services.monitoring.models import CeilometerService, OpenStackServiceMonitoringPublisher
+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 SyncOpenStackMonitoringPublisher(SyncInstanceUsingAnsible):
+    provides=[OpenStackServiceMonitoringPublisher]
+    observes=OpenStackServiceMonitoringPublisher
+    requested_interval=0
+    template_name = "sync_openstackmonitoringpublisher.yaml"
+
+    def __init__(self, *args, **kwargs):
+        super(SyncOpenStackMonitoringPublisher, self).__init__(*args, **kwargs)
+
+    def fetch_pending(self, deleted):
+        if (not deleted):
+            objs = OpenStackServiceMonitoringPublisher.get_tenant_objects().filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False))
+        else:
+            objs = OpenStackServiceMonitoringPublisher.get_deleted_tenant_objects()
+
+        return objs
+
+    def sync_record(self, o):
+        logger.info("sync'ing object %s" % str(o),extra=o.tologdict())
+
+        self.prepare_record(o)
+
+        ceilometer_services = CeilometerService.get_service_objects().filter(id=o.provider_service.id)
+        if not ceilometer_services:
+            raise "No associated Ceilometer service"
+        ceilometer_service = ceilometer_services[0]
+        service_instance = ceilometer_service.get_instance()
+        # sync only when the corresponding service instance is fully synced
+        if not service_instance:
+            self.defer_sync(o, "waiting on associated service instance")
+            return
+        if not service_instance.instance_name:
+            self.defer_sync(o, "waiting on associated service instance.instance_name")
+            return
+
+        # Step1: Orchestrate UDP proxy agent on the compute node where monitoring service VM is spawned
+
+        fields = { "hostname": ceilometer_service.ceilometer_rabbit_compute_node,
+                   "baremetal_ssh": True,
+                   "instance_name": "rootcontext",
+                   "username": "root",
+                   "container_name": None,
+                   "rabbit_host": ceilometer_service.ceilometer_rabbit_host,
+                   "rabbit_user": ceilometer_service.ceilometer_rabbit_user,
+                   "rabbit_password": ceilometer_service.ceilometer_rabbit_password,
+		   "listen_ip_addr": socket.gethostbyname(ceilometer_service.ceilometer_rabbit_compute_node)
+	}
+
+        # If 'o' defines a 'sync_attributes' list, then we'll copy those
+        # attributes into the Ansible recipe's field list automatically.
+        if hasattr(o, "sync_attributes"):
+            for attribute_name in o.sync_attributes:
+                fields[attribute_name] = getattr(o, attribute_name)
+
+        key_name = self.get_node_key(service_instance.node)
+        if not os.path.exists(key_name):
+            raise Exception("Node key %s does not exist" % key_name)
+        key = file(key_name).read()
+        fields["private_key"] = key
+
+        template_name = "sync_openstackmonitoringpublisher.yaml"
+        fields["ansible_tag"] =  o.__class__.__name__ + "_" + str(o.id) + "_step1"
+
+        self.run_playbook(o, fields, template_name)
+
+        # Step2: Orchestrate OpenStack publish agent
+        target_uri = "udp://" + ceilometer_service.ceilometer_rabbit_compute_node + ":4455"
+        fields = {}
+        agent_info = []
+        if o.monitoring_agents:
+           for agent in o.monitoring_agents.all():
+              body = {'target': target_uri}
+              if agent.start_url_json_data:
+                 start_url_dict = json.loads(agent.start_url_json_data)
+                 body.update(agent.start_url_dict)
+              a = {'url': agent.start_url, 'body': json.dumps(body)}
+              agent_info.append(a)
+
+        fields["agents"] = agent_info 
+        #fields["private_key"] = ""
+
+        template_name = "enable_monitoring_service.yaml"
+        fields["ansible_tag"] =  o.__class__.__name__ + "_" + str(o.id) + "_step2"
+
+        run_template(template_name, fields)
+
+        o.save()
+
+    def map_delete_inputs(self, o):
+        fields = {"unique_id": o.id,
+                  "delete": True}
+        return fields
+
+    def delete_record(self, o):
+        pass
+
diff --git a/xos/synchronizer/steps/sync_openstackmonitoringpublisher.yaml b/xos/synchronizer/steps/sync_openstackmonitoringpublisher.yaml
new file mode 100644
index 0000000..0549b25
--- /dev/null
+++ b/xos/synchronizer/steps/sync_openstackmonitoringpublisher.yaml
@@ -0,0 +1,45 @@
+---
+- hosts: {{ instance_name }}
+  gather_facts: False
+  connection: ssh
+  user: {{ username }}
+  sudo: yes
+  vars:
+      rabbit_user: {{ rabbit_user }}
+      rabbit_password: {{ rabbit_password }}
+      rabbit_host: {{ rabbit_host }}
+      listen_ip_addr: {{ listen_ip_addr }}
+
+  tasks:
+
+  - name: Verify if udpagent ([] is to avoid capturing the shell process) is already running
+    shell: pgrep -f [u]dpagent | wc -l
+    register: udpagent_job_pids_count
+
+  - name: DEBUG
+    debug: var=udpagent_job_pids_count.stdout
+
+  - name: stop /usr/local/share/udp_proxy if already running
+    shell: pkill -f /usr/local/share/udp_proxy/udpagent.py
+    ignore_errors: True
+    when: udpagent_job_pids_count.stdout !=  "0"
+
+  - name: make sure /usr/local/share/udp_proxy exists
+    file: path=/usr/local/share/udp_proxy state=directory owner=root group=root
+
+  - name: Copy udp_proxy component files to destination
+    copy: src=/opt/xos/synchronizers/monitoring/ceilometer/udp_proxy/udpagent.py
+      dest=/usr/local/share/udp_proxy/udpagent.py
+
+  - name: udp_proxy config
+    template: src=/opt/xos/synchronizers/monitoring/templates/udpagent.conf.j2 dest=/usr/local/share/udp_proxy/udpagent.conf mode=0777
+
+  - name: install python-kombu
+    apt: name=python-kombu state=present
+
+  - name: Launch udp_proxy
+    command: python /usr/local/share/udp_proxy/udpagent.py
+    args:
+       chdir: /usr/local/share/udp_proxy/
+    async: 9999999999999999
+    poll: 0
diff --git a/xos/synchronizer/templates/udpagent.conf.j2 b/xos/synchronizer/templates/udpagent.conf.j2
new file mode 100644
index 0000000..fe9cab6
--- /dev/null
+++ b/xos/synchronizer/templates/udpagent.conf.j2
@@ -0,0 +1,30 @@
+[udpservice]
+udp_address = {{ listen_ip_addr }}
+udp_port = 4455
+rabbit_userid = {{ rabbit_user }}
+rabbit_password = {{ rabbit_password }}
+rabbit_hosts = {{ rabbit_host }}
+acord_control_exchange = openstack_infra
+
+[loggers]
+keys=root
+
+[handlers]
+keys=logfile
+
+[formatters]
+keys=logfileformatter
+
+[logger_root]
+level=INFO
+#level=DEBUG
+handlers=logfile
+
+[formatter_logfileformatter]
+format='%(asctime)s %(filename)s %(levelname)s %(message)s'
+
+[handler_logfile]
+class=handlers.RotatingFileHandler
+level=NOTSET
+args=('udpagent.log','a',1000000,100)
+formatter=logfileformatter
diff --git a/xos/tosca/resources/inframonitoringagentinfo.py b/xos/tosca/resources/inframonitoringagentinfo.py
new file mode 100644
index 0000000..36748ba
--- /dev/null
+++ b/xos/tosca/resources/inframonitoringagentinfo.py
@@ -0,0 +1,7 @@
+from xosresource import XOSResource
+from services.monitoring.models import InfraMonitoringAgentInfo
+
+class XOSInfraMonitoringAgentInfo(XOSResource):
+    provides = "tosca.nodes.InfraMonitoringAgentInfo"
+    xos_model = InfraMonitoringAgentInfo
+    copyin_props = ["start_url", "start_url_json_data", "stop_url"]
diff --git a/xos/tosca/resources/monitoringcollectorplugininfo.py b/xos/tosca/resources/monitoringcollectorplugininfo.py
new file mode 100644
index 0000000..1d7f88f
--- /dev/null
+++ b/xos/tosca/resources/monitoringcollectorplugininfo.py
@@ -0,0 +1,7 @@
+from xosresource import XOSResource
+from services.monitoring.models import MonitoringCollectorPluginInfo
+
+class XOSMonitoringCollectorPluginInfo(XOSResource):
+    provides = "tosca.nodes.MonitoringCollectorPluginInfo"
+    xos_model = MonitoringCollectorPluginInfo
+    copyin_props = ["plugin_folder_path", "plugin_rabbit_exchange"]
diff --git a/xos/tosca/resources/onosmonitoringpublisher.py b/xos/tosca/resources/onosmonitoringpublisher.py
new file mode 100644
index 0000000..a38b556
--- /dev/null
+++ b/xos/tosca/resources/onosmonitoringpublisher.py
@@ -0,0 +1,36 @@
+from xosresource import XOSResource
+from core.models import Tenant, Service
+from services.monitoring.models import ONOSServiceMonitoringPublisher, CeilometerService, InfraMonitoringAgentInfo, MonitoringCollectorPluginInfo
+
+class XOSONOSMonitoringPublisher(XOSResource):
+    provides = "tosca.nodes.ONOSMonitoringPublisher"
+    xos_model = ONOSServiceMonitoringPublisher
+    name_field = None
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSONOSMonitoringPublisher, self).get_xos_args()
+
+        # PublisherTenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return ONOSServiceMonitoringPublisher.get_tenant_objects().filter(provider_service=args["provider_service"])
+
+    def postprocess(self, obj):
+        for ma_name in self.get_requirements("tosca.relationships.ProvidesInfraMonitoringAgentInfo"):
+            ma = self.get_xos_object(InfraMonitoringAgentInfo, name=ma_name)
+            ma.monitoring_publisher = obj
+            ma.save()
+        for mcp_name in self.get_requirements("tosca.relationships.ProvidesMonitoringCollectorPluginInfo"):
+            mcp = self.get_xos_object(MonitoringCollectorPluginInfo, name=mcp_name)
+            mcp.monitoring_publisher = obj
+            mcp.save()
+
+    def can_delete(self, obj):
+        return super(XOSONOSMonitoringPublisher, self).can_delete(obj)
+
diff --git a/xos/tosca/resources/openstackmonitoringpublisher.py b/xos/tosca/resources/openstackmonitoringpublisher.py
new file mode 100644
index 0000000..1b30555
--- /dev/null
+++ b/xos/tosca/resources/openstackmonitoringpublisher.py
@@ -0,0 +1,36 @@
+from xosresource import XOSResource
+from core.models import Tenant, Service
+from services.monitoring.models import OpenStackServiceMonitoringPublisher, CeilometerService, InfraMonitoringAgentInfo, MonitoringCollectorPluginInfo
+
+class XOSOpenStackMonitoringPublisher(XOSResource):
+    provides = "tosca.nodes.OpenStackMonitoringPublisher"
+    xos_model = OpenStackServiceMonitoringPublisher
+    name_field = None
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSOpenStackMonitoringPublisher, self).get_xos_args()
+
+        # PublisherTenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        return args
+
+    def postprocess(self, obj):
+        for ma_name in self.get_requirements("tosca.relationships.ProvidesInfraMonitoringAgentInfo"):
+            ma = self.get_xos_object(InfraMonitoringAgentInfo, name=ma_name)
+            ma.monitoring_publisher = obj
+            ma.save()
+        for mcp_name in self.get_requirements("tosca.relationships.ProvidesMonitoringCollectorPluginInfo"):
+            mcp = self.get_xos_object(MonitoringCollectorPluginInfo, name=mcp_name)
+            mcp.monitoring_publisher = obj
+            mcp.save()
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return OpenStackServiceMonitoringPublisher.get_tenant_objects().filter(provider_service=args["provider_service"])
+
+    def can_delete(self, obj):
+        return super(XOSOpenStackMonitoringPublisher, self).can_delete(obj)
+
diff --git a/xos/tosca/resources/userservicemonitoringpublisher.py b/xos/tosca/resources/userservicemonitoringpublisher.py
new file mode 100644
index 0000000..efac81d
--- /dev/null
+++ b/xos/tosca/resources/userservicemonitoringpublisher.py
@@ -0,0 +1,40 @@
+from xosresource import XOSResource
+from core.models import Tenant, Service
+from services.monitoring.models import UserServiceMonitoringPublisher, CeilometerService, InfraMonitoringAgentInfo, MonitoringCollectorPluginInfo
+
+class XOSUserServiceMonitoringPublisher(XOSResource):
+    provides = "tosca.nodes.UserServiceMonitoringPublisher"
+    xos_model = UserServiceMonitoringPublisher
+    name_field = None
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSUserServiceMonitoringPublisher, self).get_xos_args()
+
+        # PublisherTenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        target_service_name = self.get_requirement("tosca.relationships.PublishesMonitoringData", throw_exception=True)
+        if target_service_name:
+            args["target_service"] = self.get_xos_object(Service, throw_exception=True, name=target_service_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return [publisher for publisher in UserServiceMonitoringPublisher.get_tenant_objects().all() if (publisher.target_service.id == args["target_service"].id)]
+
+    def postprocess(self, obj):
+        #for ma_name in self.get_requirements("tosca.relationships.ProvidesMonitoringAgentInfo"):
+        #    ma = self.get_xos_object(MonitoringAgentInfo, name=ma_name)
+        #    ma.monitoring_publisher = obj
+        #    ma.save()
+        for mcp_name in self.get_requirements("tosca.relationships.ProvidesMonitoringCollectorPluginInfo"):
+            mcp = self.get_xos_object(MonitoringCollectorPluginInfo, name=mcp_name)
+            mcp.monitoring_publisher = obj
+            mcp.save()
+
+    def can_delete(self, obj):
+        return super(XOSUserServiceMonitoringPublisher, self).can_delete(obj)
+
