TimescaleDB

This type of distribution sends incoming data to a TimescaleDB server to be recorded.

TimescaleDB is a modified version of PostGRESQL designed to handle long term, high-speed time-series data without experiencing the major performance issues that arise when storing this sort of data in a traditional database engine.

Type Name

The type name to use in your configuration is timescale.

Configuration

The following configuration options are accepted…

NameNotesPurpose
hostnameRequiredThe full path to your API endpoint, including /api/v2/write.
portDefault=5432The host port number
databaseRequiredThe name of the database to write to
tableThe name of the table to write to
namefieldThe name of the field that contains the measurement name
valuefieldThe name of the field that contains the final value
timefieldThe name of the field that contains the timestamp
usernameThe username to connect with
passwordThe password to connect with
{
		"type": "timescale",		
		"config": {
			"hostname": "mydb.tsdb.cloud.timescale.com",
			"database": "tsdb",
			"username": "tsdbadmin",
			"password": "passwd",
			"table": "values",
			"port": 64463,
			"namefield": "name"
		}
	}

Setup

This recording technique expects a simple table structure made up of three fields - a value name, a value and a time.

To create a hypertable with this structure, try the following…

CREATE TABLE VALUES (name VARCHAR(120),VALUE DECIMAL,TIME TIMESTAMPTZ NOT NULL) WITH (
  timescaledb.hypertable,
  timescaledb.chunk_interval = '1 day'
);

Suggestions

Keep the individual point names quite simple - we suggest not using options like 'fullpath'.