id | title |
---|---|
influxdb |
InfluxDB |
ToolJet can connect to InfluxDB databases to read and write data. Use the Token authentication scheme to authenticate to the InfluxDB API. For more info visit InfluxDB docs.
ToolJet connects to InfluxDB using :
- API Token
- Host
- Port
- Protocol (HTTP/HTTPS)
:::info For generating API Token visit InfluxDB docs. :::
- Write data
- Query data
- Generate an Abstract Syntax Tree (AST) from a query
- Retrieve query suggestions
- Retrieve query suggestions for a branching suggestion
- Analyze a Flux query
- List buckets
- Create a bucket
- Retrieve a bucket
- Update a bucket
- Delete a bucket
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/operations-v3.png" alt="influx operations" style={{marginBottom:'15px'}}/>
This operation writes data to a bucket.
- Bucket
- Organization name or ID
- Data
- Precision
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/write.png" alt="influx operations" style={{marginBottom:'15px'}}/>
Retrieves data from InfluxDB buckets.
- Organization name or ID
- Flux query
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/query.png" alt="influx operations" style={{marginBottom:'15px'}}/>
from(bucket: "sensor_data")
|> range(start: -1h)
|> filter(fn: (r) => r["_measurement"] == "temperature")
This operation analyzes flux query and generates a query specification.
- Query
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/ast.png" alt="influx operations" style={{marginBottom:'15px'}}/>
from(bucket: "website_metrics")
|> range(start: -7d)
|> filter(fn: (r) => r["_measurement"] == "page_views")
|> group(columns: ["url"])
|> sum(column: "_value")
|> sort(columns: ["_value"], desc: true)
This query retrieve query suggestions.
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/retrieveQuery.png" alt="influx operations" style={{marginBottom:'15px'}}/>
This operation retrieve query suggestions for a branching suggestion.
- Name
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/queryBranch.png" alt="influx operations" style={{marginBottom:'15px'}}/>
This Analyzes a Flux query.
- Query
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/fluxQuery.png" alt="influx operations" style={{marginBottom:'15px'}}/>
from(bucket: "sensor_data")
|> range(start: -1d)
|> filter(fn: (r) => r["_measurement"] == "humidity")
|> mean(column: "_value")
This operation lists all the buckets in a database.
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/listBucket.png" alt="influx operations" style={{marginBottom:'15px'}}/>
This operation creates a bucket in database.
- Query
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/createBucket.png" alt="influx operations" style={{marginBottom:'15px'}}/>
POST http://localhost:8086/api/v2/buckets
Content-Type: application/json
Authorization: Token your_auth_token
{
"name": "new_bucket",
"orgID": "your_org_id",
"retentionRules": [
{
"everySeconds": 3600
}
]
}
This operation retrieve a bucket in a database.
- Bucket ID
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/retrieveBucket.png" alt="influx operations" style={{marginBottom:'15px'}}/>
This operaition updates the bucket in database.
- Bucket ID
- Query
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/updateBucket.png" alt="influx operations" style={{marginBottom:'15px'}}/>
{
"name": "updated_bucket_name",
"retentionRules": [
{
"everySeconds": 7200
}
]
}
This operation delete the bucket in database.
- Bucket ID
<img className="screenshot-full" src="https://github.com/img/datasource-reference/influxdb/deleteBucket.png" alt="influx operations" style={{marginBottom:'15px'}}/>