Step 3: Creating a device asset model - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 3: Creating a device asset model

In this procedure, you create an asset model in Amazon IoT SiteWise to represent your devices that stream CPU and memory usage data. To process data in assets that represent groups of devices, asset models enforce consistent information across multiple assets of the same type. For more information, see Modeling industrial assets.

To create an asset model that represents a device
  1. Navigate to the Amazon IoT SiteWise console.

  2. In the left navigation pane, choose Models.

  3. Choose Create model.

  4. Under Model details, enter a name for your model. For example, SiteWise Tutorial Device Model.

  5. Under Measurement definitions, do the following:

    1. In Name, enter CPU Usage.

    2. In Unit, enter %.

    3. Leave the Data type as Double.

    Measurement properties represent a device's raw data streams. For more information, see Defining data streams from equipment (measurements).

  6. Choose Add new measurement to add a second measurement property.

  7. In the second row under Measurement definitions, do the following:

    1. In Name, enter Memory Usage.

    2. In Unit, enter %.

    3. Leave the Data type as Double.

  8. Under Metric definitions, do the following:

    1. In Name, enter Average CPU Usage.

    2. In Formula, enter avg(CPU Usage). Choose CPU Usage from the autocomplete list when it appears.

    3. In Time interval, enter 5 minutes.

    Metric properties define aggregation calculations that process all input data points over an interval and output a single data point per interval. This metric property calculates each device's average CPU usage every 5 minutes. For more information, see Aggregating data from properties and other assets (metrics).

  9. Choose Add new metric to add a second metric property.

  10. In the second row under Metric definitions, do the following:

    1. In Name, enter Average Memory Usage.

    2. In Formula, enter avg(Memory Usage). Choose Memory Usage from the autocomplete list when it appears.

    3. In Time interval, enter 5 minutes.

    This metric property calculates each device's average memory usage every 5 minutes.

  11. (Optional) Add other additional metrics that you're interested in calculating per device. Some interesting functions include min and max. For more information, see Using formula expressions. In Step 4: Creating a device fleet asset model, you create a parent asset that can calculate metrics using data from your entire fleet of devices.

  12. Choose Create model.