TimescaleDB plugin

Overview

The TimescaleDB plugin connects QALIPSIS to TimescaleDB.

Technology addressed
Dependency

io.qalipsis:plugin-timescaledb

Namespace in scenario

timescaledb()

Client library

https://www.tigerdata.com/docs/deploy/self-hosted/tooling/install-toolkit

Analytics

QALIPSIS can publish the meters and events collected during a campaign to TimescaleDB through dedicated publishers.

Configure the publishers in the factory configuration, separate from the scenario DSL. Refer to Provide the configuration to QALIPSIS for information about specifying the configuration to QALIPSIS.

TimescaleDB requires valid credentials for authentication. Ensure that the username and password for a properly configured TimescaleDB user are provided in the configuration.

Meters

The meters publisher writes the meter snapshots collected during a campaign as rows into the configured TimescaleDB schema.

Example configuration file (YAML)
meters:
  export:
    timescaledb:
      enabled: true
      host: localhost
      port: 5432
      database: qalipsis
      schema: meters
      username: qalipsis_user
      password: qalipsis-pwd
      prefix: qalipsis
      enable-ssl: false
      ssl-mode: PREFER
      ssl-root-cert:
      ssl-cert:
      ssl-key:
      min-idle-connection: 1
      max-pool-size: 1
      init-schema: true

The parameters used to configure the publication of meters to TimescaleDB are described in the table below.

Parameter Description

meters.export.timescaledb.enabled

Activates the publication of meters to TimescaleDB. Must be set to true to enable publishing.
Data Type: Boolean
Default Value: false

meters.export.timescaledb.host

Hostname or IP address of the TimescaleDB/PostgreSQL server.
Data Type: String
Default Value: localhost

meters.export.timescaledb.port

Port on which the TimescaleDB/PostgreSQL server listens.
Data Type: Positive integer
Default Value: 5432

meters.export.timescaledb.database

Name of the TimescaleDB database receiving the meters.
Data Type: String
Default Value: qalipsis

meters.export.timescaledb.schema

Name of the schema where the meters are stored.
Data Type: String
Default Value: meters

meters.export.timescaledb.username

Name of the user used for basic authentication when connecting to TimescaleDB.
Data Type: String
Default Value: qalipsis_user

meters.export.timescaledb.password

Password of the user used for basic authentication when connecting to TimescaleDB.
Data Type: String
Default Value: qalipsis-pwd

meters.export.timescaledb.prefix

Prefix prepended to every metric name when publishing to TimescaleDB.
Data Type: String
Default Value: qalipsis

meters.export.timescaledb.enable-ssl

Enables SSL/TLS encryption for the database connection.
Data Type: Boolean
Default Value: false

meters.export.timescaledb.ssl-mode

SSL mode applied to the database connection. Acceptable values are DISABLE, ALLOW, PREFER, REQUIRE, VERIFY_CA, VERIFY_FULL.
Data Type: ENUM
Default Value: PREFER

meters.export.timescaledb.ssl-root-cert

Path to the SSL root certificate file used for SSL/TLS connections.
Data Type: String
Default Value: None

meters.export.timescaledb.ssl-cert

Path to the SSL client certificate file used for SSL/TLS connections.
Data Type: String
Default Value: None

meters.export.timescaledb.ssl-key

Path to the SSL client private key file used for SSL/TLS connections.
Data Type: String
Default Value: None

meters.export.timescaledb.min-idle-connection

Minimum number of idle database connections maintained in the connection pool.
Data Type: Positive integer
Default Value: 1

meters.export.timescaledb.max-pool-size

Maximum number of database connections in the connection pool.
Data Type: Positive integer
Default Value: 1

meters.export.timescaledb.init-schema

Creates or updates the meter schema at startup when set to true.
Data Type: Boolean
Default Value: true

Events

The events publisher buffers the events emitted during a campaign and writes them in bulk as rows into the configured TimescaleDB schema.

Example configuration file (YAML)
events:
  export:
    timescaledb:
      enabled: true
      min-level: INFO
      host: localhost
      port: 5432
      database: qalipsis
      schema: events
      linger-period: 10s
      batch-size: 20000
      publishers: 1
      username: qalipsis_user
      password: qalipsis-pwd
      enable-ssl: false
      ssl-mode: PREFER
      ssl-root-cert:
      ssl-cert:
      ssl-key:
      init-schema: true

The parameters used to configure the publication of events to TimescaleDB are described in the table below.

Parameter Description

events.export.timescaledb.enabled

Activates the publication of events to TimescaleDB. Must be set to true to enable publishing.
Data Type: Boolean
Default Value: false

events.export.timescaledb.min-level

Minimum event level published. Acceptable values are TRACE, DEBUG, INFO, WARN, ERROR, OFF.
Data Type: ENUM
Default Value: INFO

events.export.timescaledb.host

Hostname or IP address of the TimescaleDB/PostgreSQL server.
Data Type: String
Default Value: localhost

events.export.timescaledb.port

Port on which the TimescaleDB/PostgreSQL server listens.
Data Type: Positive integer
Default Value: 5432

events.export.timescaledb.database

Name of the TimescaleDB database receiving the events.
Data Type: String
Default Value: qalipsis

events.export.timescaledb.schema

Name of the schema where the events are stored.
Data Type: String
Default Value: events

events.export.timescaledb.linger-period

Maximum time the events are buffered before forcing a flush to TimescaleDB, even when the batch size is not reached.
Data Type: Duration
Default Value: 10s

events.export.timescaledb.batch-size

Maximum number of events buffered between two publications to TimescaleDB.
Data Type: Positive integer
Default Value: 20000

events.export.timescaledb.publishers

Number of concurrent publishers that can send event batches to TimescaleDB.
Data Type: Positive integer
Default Value: 1 (no concurrency)

events.export.timescaledb.username

Name of the user used for basic authentication when connecting to TimescaleDB.
Data Type: String
Default Value: qalipsis_user

events.export.timescaledb.password

Password of the user used for basic authentication when connecting to TimescaleDB.
Data Type: String
Default Value: qalipsis-pwd

events.export.timescaledb.enable-ssl

Enables SSL/TLS encryption for the database connection.
Data Type: Boolean
Default Value: false

events.export.timescaledb.ssl-mode

SSL mode applied to the database connection. Acceptable values are DISABLE, ALLOW, PREFER, REQUIRE, VERIFY_CA, VERIFY_FULL.
Data Type: ENUM
Default Value: PREFER

events.export.timescaledb.ssl-root-cert

Path to the SSL root certificate file used for SSL/TLS connections.
Data Type: String
Default Value: None

events.export.timescaledb.ssl-cert

Path to the SSL client certificate file used for SSL/TLS connections.
Data Type: String
Default Value: None

events.export.timescaledb.ssl-key

Path to the SSL client private key file used for SSL/TLS connections.
Data Type: String
Default Value: None

events.export.timescaledb.init-schema

Creates or updates the event schema at startup when set to true.
Data Type: Boolean
Default Value: true

Reference Documentation

Refer to Monitoring test campaigns for more information about meter and event configuration parameters.