Warning

We recommend customers to use Grafana version 10.4.0 or higher for the AWS IoT SiteWise Datasource. Grafana instances with versions prior to 10.4.0 are unable to use AWS IoT SiteWise data source versions beyond 1.25.2.

AWS IoT SiteWise Datasource

This datasource supports reading data from AWS IoT SiteWise and showing it in a Grafana dashboard.

Add the data source

  1. In the side menu under the Configuration link, click on Data Sources.
  2. Click the Add data source button.
  3. Select IoT SiteWise in the Industrial & IoT section.

Authentication

The IoT SiteWise plugin authentication matches the standard Cloudwatch plugin system. See the grafana cloudwatch documentation for authentication options and setup.

Once authentication is configured, click “Save and Test” to verify the service is working. Once this is configured, you can specify default values for the configuration.

Querying data

Users can choose between the UI driven Query builder and the Query code editor, that uses IoT SiteWise query language queries to fetch data. The Query builder offers a guided, less technical interface, whereas the Query code editor is more technical but also more powerful.

Query builder

Use the “query type” selector to pick an appropriate query.

query-editor

Click on the “Explore” button to open an asset/model navigation interface:

query-editor

Multiple aggregations can be shown for a single property:

query-editor

SQL Builder

Use the “Builder (SQL)” selector to switch to the SQL Builder mode.

sql-builder

Construct SQL queries step by step by specifying the FROM, SELECT, WHERE, ORDER BY, GROUP BY, and HAVING clauses.

Queries must include at least one SELECT and FROM clause to be valid.

Once the clauses are defined, a data query preview is displayed:

sql-builder

Alerting

Plugin supports standard Grafana Alerts; however note that alert queries may not include template variables. See the Alerting documentation for more on Grafana alerts.

Configure the data source with provisioning

You can configure data sources using config files with Grafana’s provisioning system. You can read more about how it works and all the settings you can set for data sources on the provisioning docs page.

Here are some provisioning examples for this data source.

Using a credentials file

If you are using Credentials file authentication type, then you should use a credentials file with a config like this.

YAML
apiVersion: 1

datasources:
  - name: IoT SiteWise
    type: grafana-iot-sitewise-datasource
    jsonData:
      authType: credentials
      defaultRegion: us-east-1

Using accessKey and secretKey

YAML
apiVersion: 1

datasources:
  - name: IoT SiteWise
    type: grafana-iot-sitewise-datasource
    jsonData:
      authType: keys
      defaultRegion: us-east-1
    secureJsonData:
      accessKey: '<your access key>'
      secretKey: '<your secret key>'

Plugin repository

You can request new features, report issues, or contribute code directly through the Sitewise data source plugin Github repository