Explore InfluxDB data in Grafana
In this milestone, you verify that your InfluxDB data source is working by running a query in Grafana’s Explore.
In the navigation menu, click Explore.
From the data source dropdown at the top-left, select your InfluxDB data source.
In the query editor, enter a sample query to retrieve data. The syntax depends on which query language you selected when configuring the data source.
Flux example:
from(bucket: "telegraf") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._field == "usage_idle") |> aggregateWindow(every: 1m, fn: mean)InfluxQL example:
SELECT mean("usage_idle") FROM "cpu" WHERE time > now() - 1h GROUP BY time(1m)SQL example:
SELECT DATE_BIN(INTERVAL '1 minute', time) AS time, AVG(usage_idle) AS usage_idle FROM cpu WHERE time > NOW() - INTERVAL '1 hour' GROUP BY 1 ORDER BY 1Tip: Replace the measurement and field names with values that match your data.
Click Run query to execute the query.
You should see time series data displayed in the results panel. If you see results, your InfluxDB data source is working correctly.
Verify successful data access
After running your query, you should see:
- Time series data displayed as a graph or table
- No connection errors or timeouts
- Data that matches what you expect from your InfluxDB instance
- The ability to modify the query and run different queries
Congratulations! You’ve successfully connected your InfluxDB instance to Grafana Cloud and verified that data is accessible.