How do I override a model to turn off a metric for a specific asset in AWS IoT SiteWise?

2 minute read
0

I want to turn off a metric for a single asset in a model in AWS IoT SiteWise.

Short description

AWS IoT SiteWise assets inherit metrics and measurements that you configure at the model level. You can use an attribute to exclude a single asset from an inherited metric or measurement. 

You must create an attribute, and update the attribute's metric formula to include an if condition. Then, update the attribute value for the asset that you don't want the metric to apply to.

Resolution

Create an attribute

Complete the following steps:

  1. Open the AWS IoT SiteWise console.
  2. In the navigation pane, choose Models.
  3. On the Models page, select the model, and then choose Edit.
  4. Under Definitions, for Property Type, choose Attributes, and then choose Add new attribute.
  5. For the attribute, enter the following information:
    For Name, enter a name for the attribute, such as metricEnabled.
    For Data type, select Boolean.
    For Default value, select True.
  6. Choose Save.

The model applies the metricEnabled attribute with a value of True to all assets that use the model.

Update the metric formula

Complete the following steps:

  1. Open the AWS IoT SiteWise console.
  2. In the navigation pane, choose Models.
  3. On the Models page, select the model, and then choose Edit.
  4. Under Definitions, for Property Type, choose Metrics, and then select the metric that you want to turn off.
  5. For Formula, update the formula to include an if condition for the attribute, for example, if({metricEnabled},avg({Wind Speed}),none).
  6. Choose Save.

Now that you turned on the metricEnabled attribute for the Average Wind Speed metric, the metric monitors all assets in the model.

Update the attribute value

Complete the following steps:

  1. Open the AWS IoT SiteWise console.
  2. In the navigation pane, choose Assets.
  3. On the Assets page, select the asset, and then choose Edit.
  4. Under Properties, for Property Type, choose Attributes.
  5. For metricEnabled, select False.
  6. Choose Save.

You now turned off the Average Wind Speed metric for the single asset.

Note: To turn off the metric for new assets, set the attribute value to False when you create the asset.

AWS OFFICIAL
AWS OFFICIALUpdated 16 days ago