diff --git a/files/ext_services/passivetest/notifications.py b/files/ext_services/passivetest/notifications.py
new file mode 100644
index 0000000..8645820
--- /dev/null
+++ b/files/ext_services/passivetest/notifications.py
@@ -0,0 +1,54 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import oslo_messaging
+from oslo_config import cfg
+
+from ceilometer.agent import plugin_base
+from oslo_log import log
+from ceilometer import sample
+
+OPTS = [
+    cfg.StrOpt('passivetestservice_control_exchange',
+               default='passivetestservice',
+               help="Exchange name for PassiveTest notifications."),
+]
+
+cfg.CONF.register_opts(OPTS)
+
+LOG = log.getLogger(__name__)
+
+class PassiveTestNotification(plugin_base.NotificationBase):
+
+    resource_name = None
+    event_types = ['passivetest.stats']
+
+    def get_targets(self,conf):
+        """Return a sequence of oslo.messaging.Target
+
+        This sequence is defining the exchange and topics to be connected for
+        this plugin.
+        """
+
+        return [oslo_messaging.Target(topic=topic,
+                                      exchange=conf.passivetestservice_control_exchange)
+                for topic in self.get_notification_topics(conf)]
+
+
+    def process_notification(self, message):
+        LOG.debug('Received Passivetest event passivetest.stats')
+
+        if message['payload']:
+            message['payload']['volume']=float(message['payload']['volume'])
+            yield sample.Sample.from_notification(
+                message=message,
+                **message['payload'])
