Running Telegraf with the Timestream for LiveAnalytics output plugin - Amazon Timestream

Running Telegraf with the Timestream for LiveAnalytics output plugin

You can follow the instructions below to run Telegraf with the Timestream for LiveAnalytics plugin.

  1. Generate an example configuration using Telegraf.

    telegraf --section-filter agent:inputs:outputs --input-filter cpu:mem --output-filter timestream config > example.config
  2. Create a database in Timestream using the management console, CLI, or SDKs.

  3. In the example.config file, add your database name by editing the following key under the [[outputs.timestream]] section.

    database_name = "yourDatabaseNameHere"
  4. By default, Telegraf will create a table. If you wish create a table manually, set create_table_if_not_exists to false and follow the instructions to create a table using the management console, CLI, or SDKs.

  5. In the example.config file, configure credentials under the [[outputs.timestream]] section. The credentials should allow the following operations.

    timestream:DescribeEndpoints timestream:WriteRecords
    Note

    If you leave create_table_if_not_exists set to true, include:

    timestream:CreateTable
    Note

    If you set describe_database_on_start to true, include the following.

    timestream:DescribeDatabase
  6. You can edit the rest of the configuration according to your preferences.

  7. When you have finished editing the config file, run Telegraf with the following.

    ./telegraf --config example.config
  8. Metrics should appear within a few seconds, depending on your agent configuration. You should also see the new tables, cpu and mem, in the Timestream console.