Loading

  1. How to export InfluxDB data in line protocol ?
  2. Configuration
  3. Example

InfluxDB Plugin

This is an easy way to make a transition between InfluxDB and Warp 10™, also called "Influx Reflux", or "OutFlux". This extension mimics an InfluxDB line protocol endpoint.

Your existing data sources can then push data into Warp 10, just changing the endpoint.

  • Measurement.Field will be the GTS classname
  • Tags will be the GTS labels
  • Value will be the field value.
  • There won't be any geographic information in the GTS.

How to export InfluxDB data in line protocol ?

There is some examples provided by InfluxDB. As this database is often doing breaking changes, the best way might be to ask their support.

Note we also provide another alternative for migration, or at least to do analytics better than Flux (see here, or there): The influxdb extension allow you to make influxDB queries from within WarpScript.

Configuration

Your custom configurations can be stored in a new etc/conf.d/99-myWarp10.conf file. Your custom configurations will override all the predefined Warp 10 configuration.

// Activate InfluxDB plugin
warp10.plugin.influxdb = io.warp10.plugins.influxdb.InfluxDBWarp10Plugin
// Port the InfluxDB plugin will listen on
influxdb.port = 18086
// IP the InfluxDB plugin will listen on  (defaults to 127.0.0.1)
influxdb.host = 127.0.0.1
// Timeout (in ms) when expecting a HTTP request (defaults to 30000 ms)
influxdb.idle.timeout = 30000
// Number of threads Jetty should use (defaults to 1 + acceptors + acceptors * selectors which is the minimum)
influxdb.jetty.threadpool = 11
// Size of the queue to use for the Jetty thread pool. By default no queue is used
influxdb.jetty.maxqueuesize = 8
// Number of Jetty acceptors to use (defaults to 2)
influxdb.acceptors = 2
// Number of Jetty selectors to use (defaults to 4)
influxdb.selectors = 4
// Warp 10 instance update endpoint to push the data to
influxdb.warp10.endpoint = http://localhost:8080/api/v0/update
// Default token to be used to update the data to the specified Warp 10 instance. By default uses the password in the request as token.
influxdb.default.token = yourWarp10WriteTokenHere

Example

After setting influxdb.default.token with a valid token for your local Warp 10 instance:

Your influxDB text input is:

weather,location=us-midwest,season=summer temperature=82 1465839830100400200

You can curl it to the influxDB plugin:

curl --data-binary "weather,location=us-midwest,season=summer temperature=82 1465839830100400200" http://localhost:18086/

If you read the data in Warp10, with the matching read token:

curl "http://localhost:8080/api/v0/fetch?token=MyReadTokenHere&selector=~weather.*\{\}&now=now&timespan=-10"

You will get this GTS:

1465839830100400// weather.temperature{season=summer,location=us-midwest,.app=yourTokenApp} 82

measurement.field becomes the classname, tags become labels.

Because the most popular database is not always the good one for your application, if you need our help to develop another transition tool, please contact us!