InfluxDB binding spec

Detailed documentation on the InfluxDB binding component

Component format

To setup InfluxDB binding create a component of type bindings.influx. See this guide on how to create and apply a binding configuration.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. spec:
  6. type: bindings.influx
  7. version: v1
  8. metadata:
  9. - name: url # Required
  10. value: <INFLUX-DB-URL>
  11. - name: token # Required
  12. value: <TOKEN>
  13. - name: org # Required
  14. value: <ORG>
  15. - name: bucket # Required
  16. value: <BUCKET>

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Spec metadata fields

FieldRequiredBinding supportDetailsExample
urlYOutputThe URL for the InfluxDB instancehttp://localhost:8086
tokenYOutputThe authorization token for InfluxDB“mytoken”
orgYOutputThe InfluxDB organization“myorg”
bucketYOutputBucket name to write to“mybucket”

Binding support

This component supports output binding with the following operations:

  • create
  • query

Query

In order to query InfluxDB, use a query operation along with a raw key in the call’s metadata, with the query as the value:

  1. curl -X POST http://localhost:3500/v1.0/bindings/myInfluxBinding \
  2. -H "Content-Type: application/json" \
  3. -d "{
  4. \"metadata\": {
  5. \"raw\": "SELECT * FROM 'sith_lords'"
  6. },
  7. \"operation\": \"query\"
  8. }"

Last modified July 27, 2022: Remove namespace element from component examples (#2647) (ff9de5c8)