Step 4: Creating a device fleet 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 4: Creating a device fleet asset model

In this procedure, you craft an asset model in Amazon IoT SiteWise to symbolize your collection of devices. Within this asset model, you establish a structure that allows you to link numerous device assets to one overarching fleet asset. Following that, you outline metrics in the fleet asset model to consolidate data from all connected device assets. This approach provides you with comprehensive insights into the collective performance of your entire fleet.

To create an asset model that represents a device fleet
  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 Fleet Model.

  5. Under Hierarchy definitions, do the following:

    1. In Hierarchy name, enter Device.

    2. In Hierarchy model, choose your device asset model (SiteWise Tutorial Device Model).

    A hierarchy defines a relationship between a parent (fleet) asset model and a child (device) asset model. Parent assets can access child assets' property data. When you create assets later, you need to associate child assets to parent assets according to a hierarchy definition in the parent asset model. For more information, see Defining asset model hierarchies.

  6. Under Metric definitions, do the following:

    1. In Name, enter Average CPU Usage.

    2. In Formula, enter avg(Device | Average CPU Usage). When the autocomplete list appears, choose Device to choose a hierarchy, then choose Average CPU Usage to choose the metric from the device asset that you created earlier.

    3. In Time interval, enter 5 minutes.

    This metric property calculates the average CPU usage of all device assets associated to a fleet asset through the Device hierarchy.

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

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

    1. In Name, enter Average Memory Usage.

    2. In Formula, enter avg(Device | Average Memory Usage). When the autocomplete list appears, choose Device to choose a hierarchy, then choose Average Memory Usage to choose the metric from the device asset that you created earlier.

    3. In Time interval, enter 5 minutes.

    This metric property calculates the average memory usage of all device assets associated to a fleet asset through the Device hierarchy.

  9. (Optional) Add other additional metrics that you're interested in calculating across your fleet of devices.

  10. Choose Create model.