diff --git a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
index 9d1ba65..565bb30 100644
--- a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
+++ b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
@@ -28,6 +28,7 @@
 from twisted.internet.defer import DeferredQueue, inlineCallbacks, returnValue, TimeoutError
 
 from heartbeat import HeartBeat
+from voltha.extensions.alarms.onu.onu_active_alarm import OnuActiveAlarm
 from voltha.extensions.kpi.onu.onu_pm_metrics import OnuPmMetrics
 from voltha.extensions.kpi.onu.onu_omci_pm import OnuOmciPmMetrics
 from voltha.extensions.alarms.adapter_alarms import AdapterAlarms
@@ -1360,6 +1361,9 @@
                     self._mib_download_done.extend(self._get_uni_ids(device))
                     self._execute_queued_tp_task()
 
+                    # raise onu activated alarm
+                    self.onu_active_alarm()
+
                 def failure(_reason):
                     self.log.warn('mib-download-failure-retrying', _reason=_reason)
                     device.reason = 'initial-mib-download-failure-retrying'
@@ -1435,3 +1439,43 @@
 
         self.adapter_agent.add_port_reference_to_parent(self.device_id,
                                                         pon_port)
+
+    def onu_active_alarm(self):
+        self.log.debug('function-entry')
+        try:
+            device = self.adapter_agent.get_device(self.device_id)
+            parent_device = self.adapter_agent.get_device(self.parent_id)
+            olt_serial_number = parent_device.serial_number
+            datapath_id = self.get_datapath_id()
+        except Exception as e:
+            self.log.exception("error-handling-onu-active-alarm", e=e)
+            return
+
+        self.log.debug("onu-indication-context-data",
+                       pon_id=self._onu_indication.intf_id,
+                       registration_id=self._onu_indication.registration_id,
+                       device_id=self.device_id,
+                       onu_serial_number=device.serial_number,
+                       olt_serial_number=olt_serial_number)
+        try:
+            OnuActiveAlarm(self.alarms, self.device_id,
+                           self._onu_indication.intf_id,
+                           device.serial_number,
+                           self._onu_indication.registration_id,
+                           olt_serial_number,onu_id=self._onu_indication.onu_id,
+                           datapath_id=datapath_id).raise_alarm()
+        except Exception as active_alarm_error:
+            self.log.exception('onu-activated-alarm-error',
+                               errmsg=active_alarm_error.message)
+
+    def get_datapath_id(self):
+        datapath_hex_id = None
+        try:
+            logical_device = self.adapter_agent.get_logical_device(
+                self.logical_device_id)
+            datapath_hex_id = format(logical_device.datapath_id, '016x')
+            self.log.debug("datapath-hex-id", datapath_hex_id=datapath_hex_id)
+        except Exception as e:
+            self.log.exception('datapath-id-error:', e=e)
+        return datapath_hex_id
+
diff --git a/voltha/adapters/openolt/openolt_data_model.py b/voltha/adapters/openolt/openolt_data_model.py
index 9bc8d3d..dda5b32 100644
--- a/voltha/adapters/openolt/openolt_data_model.py
+++ b/voltha/adapters/openolt/openolt_data_model.py
@@ -274,12 +274,10 @@
         onu_adapter_agent.update_interface(onu_device,
                                            {'oper_state': 'down'})
 
-    def onu_oper_up(self, intf_id, onu_id):
+    def onu_oper_up(self, onu_indication):
 
-        class _OnuIndication:
-            def __init__(self, intf_id, onu_id):
-                self.intf_id = intf_id
-                self.onu_id = onu_id
+        intf_id = onu_indication.intf_id
+        onu_id = onu_indication.onu_id
 
         onu_device = self.adapter_agent.get_child_device(
             self.device.id,
@@ -310,7 +308,7 @@
             return
 
         onu_adapter_agent.create_interface(onu_device,
-                                           _OnuIndication(intf_id, onu_id))
+                                           onu_indication)
 
     def onu_download_tech_profile(self, intf_id, onu_id, uni_id, tp_path):
         onu_device = self.adapter_agent.get_child_device(
diff --git a/voltha/adapters/openolt/protos/openolt.proto b/voltha/adapters/openolt/protos/openolt.proto
index 7e52f02..cdd7ab7 100644
--- a/voltha/adapters/openolt/protos/openolt.proto
+++ b/voltha/adapters/openolt/protos/openolt.proto
@@ -227,6 +227,7 @@
     string oper_state = 3;      // up, down
     string admin_state = 5;     // up, down
     SerialNumber serial_number = 4;
+    bytes registration_id = 6;
 }
 
 message IntfOperIndication {
diff --git a/voltha/extensions/alarms/onu/onu_active_alarm.py b/voltha/extensions/alarms/onu/onu_active_alarm.py
index a139875..134f6ab 100644
--- a/voltha/extensions/alarms/onu/onu_active_alarm.py
+++ b/voltha/extensions/alarms/onu/onu_active_alarm.py
@@ -18,7 +18,7 @@
 
 class OnuActiveAlarm(AlarmBase):
     def __init__(self, alarm_mgr, device_id, pon_id, onu_serial_number,
-                 reg_id, olt_serial_number, ipv4_address=None):
+                 reg_id, olt_serial_number, ipv4_address=None, onu_id=None, datapath_id=None):
         super(OnuActiveAlarm, self).__init__(alarm_mgr, object_type='ONU',
                                              alarm='ONU_ACTIVATED',
                                              alarm_category=AlarmEventCategory.PON,
@@ -26,19 +26,23 @@
                                              alarm_type=AlarmEventType.EQUIPMENT,
                                              alarm_severity=AlarmEventSeverity.CRITICAL)
         self._pon_id = pon_id
+        self._onu_id = onu_id
         self._onu_serial_number = onu_serial_number
         self._device_id = device_id
         self._olt_serial_number = olt_serial_number
         self._host = ipv4_address
         self._reg_id = reg_id
+        self._datapath_id = datapath_id
 
     def get_context_data(self):
         data = {
-            'pon-id': self._pon_id,
-            'serial-number': self._onu_serial_number,
+            'pon_id': self._pon_id,
+            'onu_id': self._onu_id,
+            'serial_number': self._onu_serial_number,
             'olt_serial_number': self._olt_serial_number,
             'device_id': self._device_id,
-            'registration_id': self._reg_id
+            'registration_id': self._reg_id,
+            'datapath_id': self._datapath_id
         }
         if self._host is not None:
             data['host'] = self._host
