InfluxDB
InfluxQL queries over the v1 query API.
In a dashboard file: a connection with "driver": "influx", its settings in config, and what a data source of it reads in that data source’s params (Connections and data sources).
Example
Section titled “Example”A dashboard with a connection of this driver, named influx, and a tile that reads it. Any number of tiles can read the same connection. In the editor, the values of params are picked from what the connection lists; ids in the example are made up.
{ "schemaVersion": 4, "connections": { "influx": { "driver": "influx", "config": { "url": "http://192.168.1.20:8086", "database": "home" } } }, "screens": [ { "name": "Home", "tiles": [ { "type": "graph", "label": "Solar, last 24 hours", "layout": { "x": 1, "y": 1, "width": 2, "height": 2 }, "dataSource": { "connection": "influx", "params": { "measurement": "solar", "field": "pv_power", "func": "mean", "period": "24h", "grouping": "1h", "tz": "Europe/Brussels" } }, "options": { "graph": { "series": [ { "source": "primary", "color": "#ffcc00", "fill": "fade" } ], "unit": "W" } } } ] } ]}Settings (config)
Section titled “Settings (config)”| Field | Type | Default | What |
|---|---|---|---|
url |
text | required | The server, for example http://192.168.1.20:8086. |
org |
text | The organisation, for InfluxDB 2 and later. | |
database |
text | The database, or the bucket mapped to one. | |
token |
text | An API token, where the server asks for one. A credential. | |
refreshInterval |
number, above 0 | Seconds between refreshes. |
What a data source reads (params)
Section titled “What a data source reads (params)”| Field | Type | Default | What |
|---|---|---|---|
refreshInterval |
number, above 0 | Refresh every. Seconds; the connection’s setting when left out. |
And one of two ways:
Measurement and field
Section titled “Measurement and field”A measurement and one of its fields, as a value or a history.
| Field | Type | Default | What |
|---|---|---|---|
measurement |
text | required | Measurement. What is measured. |
field |
text | required | Field. Which of its fields. |
func |
one of last, mean, min, max, sum |
Function. Over the period, or each interval; the last value when left out, the mean when grouped. | |
period |
text | Period. A history over this long, such as 24h or 7d; a single value when left out. | |
grouping |
text | Group by. One value per interval, such as 1h or 1d, a gap taking the one before. | |
tz |
text | Time zone. Where the intervals start, such as Europe/Brussels; UTC when left out. |
An InfluxQL query of its own.
| Field | Type | Default | What |
|---|---|---|---|
query |
text | required | Query. InfluxQL; {{…}} dates are filled in. |