Events

Review the Events service event types emitted for OCI IoT domain group, domain, and Flow Runtime lifecycle operations.

You can use metrics, alarms, notifications, and Events rules to monitor and route IoT lifecycle events. This topic lists the event types emitted when an IoT domain group, IoT domain, or IoT Flow Runtime is created, updated, or deleted, and when an IoT Flow Runtime is activated or deactivated.

Resources: IoT domain groups, IoT domains, and IoT Flow Runtimes.

Prerequisites

To monitor or route IoT events, you must have permission to view the IoT resources and to create or manage Events rules in the target compartment. See Events Service Permissions.

  • Use an Events rule to match IoT event types and deliver matching events to a supported action.

    1. Open the navigation menu and select Observability & Management. Under Events Service, select Rules.
    2. Select the compartment that contains the IoT resources you want to monitor.
    3. Select Create Rule, and enter a display name and optional description.
    4. Under Rule Conditions, add an Event Type condition that matches one or more values from the event table for the resource type.
    5. Under Actions, select the Notifications topic, Streaming destination, or Functions destination that receives matching events. If you select Notifications, use the topic whose email subscription is Active.
    6. Select Create Rule.
  • Create an actions.json file for the Notifications, Streaming, or Functions destination, and then use the oci events rule create command. For a Notifications action, reference the topic whose email subscription is Active. The following example matches the end of a successful IoT Flow Runtime create operation.

    oci events rule create \
      --compartment-id <compartment-OCID> \
      --condition '{"eventType":"com.oraclecloud.iot.createiotflowruntime.end"}' \
      --display-name "<rule-name>" \
      --is-enabled true \
      --actions file://actions.json

    Replace the event type with one or more values from the appropriate resource-specific event table. For all options, see CLI Command Reference.

  • Run the Events CreateRule operation. In CreateRuleDetails, provide the compartment OCID, display name, enabled state, condition, and actions. Set condition to match one or more event type values from the appropriate resource-specific event table. For a Notifications action, reference the topic whose email subscription is Active.

    Use the Monitoring API for alarms and metrics when you monitor service behavior.

Overview of IoT Events

IoT domain groups, IoT domains, and IoT Flow Runtimes emit Events service events for lifecycle operations. You can create Events rules that match one or more of these event types and deliver matching events to another OCI service for notification, automation, or downstream processing. For more information, see Overview of Events.

IoT Domain Group Events

The following event types are available for IoT domain group lifecycle operations.

Friendly Name Event Type
Create IoT Domain Group Begin com.oraclecloud.iot.createiotdomaingroup.begin
Create IoT Domain Group End com.oraclecloud.iot.createiotdomaingroup.end
Update IoT Domain Group Begin com.oraclecloud.iot.updateiotdomaingroup.begin
Update IoT Domain Group End com.oraclecloud.iot.updateiotdomaingroup.end
Delete IoT Domain Group Begin com.oraclecloud.iot.deleteiotdomaingroup.begin
Delete IoT Domain Group End com.oraclecloud.iot.deleteiotdomaingroup.end

IoT Domain Events

The following event types are available for IoT domain lifecycle operations.

Friendly Name Event Type
Create IoT Domain Begin com.oraclecloud.iot.createiotdomain.begin
Create IoT Domain End com.oraclecloud.iot.createiotdomain.end
Update IoT Domain Begin com.oraclecloud.iot.updateiotdomain.begin
Update IoT Domain End com.oraclecloud.iot.updateiotdomain.end
Delete IoT Domain Begin com.oraclecloud.iot.deleteiotdomain.begin
Delete IoT Domain End com.oraclecloud.iot.deleteiotdomain.end

IoT Flow Runtime Events

The following event types are available for IoT Flow Runtime lifecycle operations.

Friendly Name Event Type
Create IoT Flow Runtime Begin com.oraclecloud.iot.createiotflowruntime.begin
Create IoT Flow Runtime End com.oraclecloud.iot.createiotflowruntime.end
Update IoT Flow Runtime Begin com.oraclecloud.iot.updateiotflowruntime.begin
Update IoT Flow Runtime End com.oraclecloud.iot.updateiotflowruntime.end
Delete IoT Flow Runtime Begin com.oraclecloud.iot.deleteiotflowruntime.begin
Delete IoT Flow Runtime End com.oraclecloud.iot.deleteiotflowruntime.end
Activate IoT Flow Runtime Begin com.oraclecloud.iot.activateiotflowruntime.begin
Activate IoT Flow Runtime End com.oraclecloud.iot.activateiotflowruntime.end
Deactivate IoT Flow Runtime Begin com.oraclecloud.iot.deactivateiotflowruntime.begin
Deactivate IoT Flow Runtime End com.oraclecloud.iot.deactivateiotflowruntime.end