InfluxDB (Database service)

InfluxDB is a time series database optimized for high-write-volume use cases such as logs, sensor data, and real-time analytics.

It exposes an HTTP API for client interaction. See the InfluxDB documentation for more information.

Supported versions 

Grid Dedicated Gen 3 Dedicated Gen 2
  • 2.3
None available None available


The format exposed in the $PLATFORM_RELATIONSHIPS environment variable:

    "service": "influxdb18",
    "ip": "",
    "hostname": "",
    "cluster": "rjify4yjcwxaa-master-7rqtwti",
    "host": "influxdb.internal",
    "rel": "influxdb",
    "scheme": "http",
    "type": "influxdb:1.8",
    "port": 8086

Usage example 

1. Configure the service 

Use the influxdb type to define the service:

    type: influxdb:<VERSION>
    disk: 256

Note that if you later change the name, it’s treated as an entirely new service. This removes all data from your service. Always backup your data before changing the service.

2. Add the relationship 

Use the influxdb endpoint to define the relationship:

You can define <SERVICE_NAME> and <RELATIONSHIP_NAME> as you like, but it’s best if they’re distinct.

Example Configuration 

Service definition

    type: influxdb:2.3
    disk: 256

App configuration
    influxtimedb: "timedb:influxdb"

Use in app 

Then use the service in your app with a configuration file like the following:

// This assumes a fictional application with an array named $settings.
	$relationships = json_decode(base64_decode($relationships), TRUE);

	// For a relationship named 'influxtimedb' referring to one endpoint.
	if (!empty($relationships['influxtimedb'])) {
		foreach ($relationships['influxtimedb'] as $endpoint) {
			$settings['influxdb_host'] = $endpoint['host'];
			$settings['influxdb_port'] = $endpoint['port'];

Exporting data 

InfluxDB includes its own export mechanism. To gain access to the server from your local machine open an SSH tunnel with the CLI:

platform tunnel:open

That opens an SSH tunnel to all services on your current environment and produce output like the following:

SSH tunnel opened on port 30000 to relationship: influxtimedb

The port may vary in your case. Then run InfluxDB’s export commands as desired.

influx_inspect export -compress