Plugins 〉Amazon Timestream

Data Source
grafana

Amazon Timestream

  • Overview
  • Installation
  • Change log
  • Related content

Timestream Datasource

The Timestream datasource plugin provides a support for Amazon Timestream. Add it as a data source, then you are ready to build dashboards using timestream query results

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 Timestream in the Time series databases section.

Authentication

The Timestream plugin authentication system matches the standard Cloudwatch plugin system. See the grafana 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.

Query editor

The query editor accepts timestream syntax in addition to the macros listed above and any dashboard template variables.

query-editor

Type ctrl+space to open open the IntelliSense suggestions

Macros

To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros.

Macro exampleDescription
$__databaseWill specify the selected database. This may use the default from the datasource config, or the explicit value from the query editor.
$__tableWill specify the selected database. This may use the default from the datasource config, or the explicit value from the query editor.
$__measureWill specify the selected measure. This may use the default from the datasource config, or the explicit value from the query editor.
$__timeFilterWill be replaced by an expression that limits the time to the dashboard range
$__interval_msWill be replaced by a number that represents the amount of time a single pixel in the graph should cover

Using Variables in Queries

Grafana template variables can be used in query Timestream query. See the grafana documentaiton on template variables for more information on how to setup and use variables.

Disabling quoting for multi-value variables

Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if server01 and server02 are selected then it will be formatted as: 'server01', 'server02'. To disable quoting, use the csv formatting option for variables:

${servers:csv}

Read more about variable formatting options in the Variables documentation.

Alerting

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.

apiVersion: 1

datasources:

  • name: Timestream type: grafana-timestream-datasource jsonData: authType: credentials defaultRegion: us-east-1

Using accessKey and secretKey

apiVersion: 1

datasources:

  • name: Timestream type: grafana-timestream-datasource jsonData: authType: keys defaultRegion: us-east-1 secureJsonData: accessKey: ‘<your access key>’ secretKey: ‘<your secret key>’

Sample Dashboard

This plugin contains one sample dashboard. Please consult the Sample Application section in the official Timestream doc to set it up.

For more information, visit the docs on plugin installation.

Change Log

All notable changes to this project will be documented in this file.

v1.3.3

  • Support for multiple timeseries columns
  • Improved support for custom endpoint

v1.3.2

  • Adding eu-central-1 region
  • renamed "master" branch to "main"
  • build with Golang 1.6

v1.3.1

  • Execute each query in its own request, this will support multiple queries that require multiple pages to complete
  • Upgrade shared authenticaiton library
  • Bump minimum grafana runtime to 7.5

v1.3.0

  • fix bug with supporting multi-page timeseries results
  • Use a shared authentication library and UI component
  • Bump minimum grafana runtime to 7.4

v1.2.0

  • Support $__timefilter on armhf (#52, @mg-arne)
  • Add $__now_ms macro (#49, @squalou)
  • Fixed region picker default values

v1.1.2

  • Fix template variable queries
  • Only show valid regions

v1.1.1

  • Avoid double escaping
  • support template variables in query

v1.1.0

  • Updated authentication to match builtin cloudwatch authentication
  • Include query status in metadata
  • Examples and query suggestions now quote all names

v1.0.0

  • Initial Release