Defining an AWS IoT Events alarm (AWS IoT SiteWise console) - AWS IoT SiteWise

Defining an AWS IoT Events alarm (AWS IoT SiteWise console)

You can use the AWS IoT SiteWise console to define an AWS IoT Events alarm on an existing asset model. To define an AWS IoT Events alarm on a new asset model, create the asset model, and then complete these steps. For more information, see Creating asset models.

Important

Each alarm requires an attribute that specifies the threshold value to compare against for the alarm. You must define the threshold value attribute on the asset model before you can define an alarm.

Consider an example where you want to define an alarm that detects when a wind turbine exceeds its maximum wind speed rating of 50 mph. Before you define the alarm, you must define an attribute (Maximum wind speed) with a default value of 50.

To define an AWS IoT Events alarm on an asset model
  1. Navigate to the AWS IoT SiteWise console.

  2. In the navigation pane, choose Models.

  3. Choose the asset model for which to define an alarm.

  4. Choose the Alarm tab.

  5. Choose Add alarm.

  6. In the Alarm type options section, choose AWS IoT Events alarm.

  7. In the Alarm details section, do the following:

    1. Enter a name for your alarm.

    2. (Optional) Enter a description for your alarm.

  8. In the Threshold definitions section, you define when the alarm detects and the severity of the alarm. Do the following:

    1. Select the Property on which the alarm detects. Each time this property receives a new value, AWS IoT SiteWise sends the value to AWS IoT Events to evaluate the state of the alarm.

    2. Select the Operator to use to compare the property with the threshold value. Choose from the following options:

      • < less than

      • <= less than or equal

      • == equal

      • != not equal

      • >= greater than or equal

      • > greater than

    3. For Value, select the attribute property to use as the threshold value. AWS IoT Events compares the value of the property with the value of this attribute.

    4. Enter the Severity of the alarm. Use a number that your team understands to reflect the severity of this alarm.

  9. (Optional) In the Notification settings - optional section, do the following:

    1. Choose Active.

      Note

      If you choose Inactive, you and your team won't receive any alarm notifications.

    2. For Recipient, choose the recipient.

      Important

      You can send alarm notifications to AWS IAM Identity Center users. To use this feature, you must enable IAM Identity Center. You can only enable IAM Identity Center in one AWS Region at a time. This means that you can define alarm notifications only in the Region where you enable IAM Identity Center. For more information, see Getting started in the AWS IAM Identity Center User Guide.

    3. For Protocol, choose from the following options:

      • Email & text – The alarm notifies IAM Identity Center users with an SMS message and an email message.

      • Email – The alarm notifies IAM Identity Center users with an email message.

      • Text – The alarm notifies IAM Identity Center users with an SMS message.

    4. For Sender, choose the sender.

      Important

      You must verify the sender email address in Amazon Simple Email Service (Amazon SES). For more information, see Verifying email addresses in Amazon SES, in the Amazon Simple Email Service Developer Guide.

  10. In the Default asset state section, you can set the default state for alarms created from this asset model.

    Note

    You activate or deactivate this alarm for assets that you create from this asset model in a later step.

  11. In the Advanced settings section, you can configure the permissions, the additional notification settings, the alarm state actions, the alarm model in SiteWise Monitor, and the acknowledge flow.

    Note

    AWS IoT Events alarms require the following service roles:

    • A role that AWS IoT Events assumes to send alarm state values to AWS IoT SiteWise.

    • A role that AWS IoT Events assumes to send data to Lambda. You only need this role if your alarm sends notifications.

    In the Permissions section, do the following:

    1. For AWS IoT Events role, use an existing role or create a role with the required permissions. This role requires the iotsitewise:BatchPutAssetPropertyValue permission and a trust relationship that allows iotevents.amazonaws.com to assume the role.

    2. For the AWS IoT Events Lambda role, use an existing role or create a role with the required permissions. This role requires the lambda:InvokeFunction and sso-directory:DescribeUser permissions and a trust relationship that allows iotevents.amazonaws.com to assume the role.

  12. (Optional) In the Additional notification settings section, do the following:

    1. For Recipient attribute, you define an attribute whose value specifies the recipient of the notification. You can choose IAM Identity Center users as recipients.

      You can create an attribute or use an existing attribute on the asset model.

      • If you choose Create a new recipient attribute, specify the Recipient attribute name and Recipient default value - optional for the attribute.

      • If you choose Use an existing recipient attribute, choose the attribute in Recipient attribute name. The alarm uses the default value of the attribute that you choose.

      You can override the default value on each asset that you create from this asset model.

    2. For Custom message attribute, you define an attribute whose value specifies the custom message to send in addition to the default state change message. For example, you can specify a message that helps your team understand how to address this alarm.

      You can choose to create an attribute or use an existing attribute on the asset model.

      • If you choose to Create a new custom message attribute, specify the Custom message attribute name and Custom message default value - optional for the attribute.

      • If you choose Use an existing custom message attribute, choose the attribute in Custom message attribute name. The alarm uses the default value of the attribute that you choose.

      You can override the default value on each asset that you create from this asset model.

    3. For Manage your Lambda function, do one of the following:

      • To have AWS IoT SiteWise create a new Lambda function, choose Create a new lambda from an AWS managed template.

      • To use an existing Lambda function, choose Use an existing lambda and choose the name of the function.

      For more information, see Managing alarm notifications in the AWS IoT Events Developer Guide.

  13. (Optional) In the Set state action section, do the following:

    1. Choose Edit action.

    2. Under Add alarm state actions, add actions. and the choose Save.

      You can add up to 10 actions.

    AWS IoT Events can perform actions when the alarm is active. You can define built-in actions to use a timer or set a variable, or send data to other AWS resources. For more information, see Supported actions in the AWS IoT Events Developer Guide.

  14. (Optional) Under Manage alarm model in SiteWise Monitor - optional, choose Active or Inactive.

    Use this option so that you can update the alarm model in SiteWise Monitorss. This option is enabled by default.

  15. Under Acknowledge flow, choose Active or Inactive. For more information about the acknowledge flow, see Alarm states.

  16. Choose Add alarm.

    Note

    The AWS IoT SiteWise console makes multiple API requests to add the alarm to the asset model. When you choose Add alarm, the console opens a dialog box that shows the progress of these API requests. Stay on this page until each API requests succeeds or until an API request fails. If a request fails, close the dialog box, fix the issue, and choose Add alarm to try again.