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. namespace: <NAMESPACE>
  6. spec:
  7. type: bindings.influx
  8. version: v1
  9. metadata:
  10. - name: url # Required
  11. value: <INFLUX-DB-URL>
  12. - name: token # Required
  13. value: <TOKEN>
  14. - name: org # Required
  15. value: <ORG>
  16. - name: bucket # Required
  17. 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 June 23, 2022: Merge pull request #2550 from ItalyPaleAle/cosmosdb-harcoded-dapr-version (cf03237)