Use Grafana with InfluxDB OSS
Use Grafana or Grafana Cloud to visualize data from your InfluxDB instance.
The instructions in this guide require Grafana Cloud or Grafana v7.1+.
- Start InfluxDB OSS 2.0.
- Sign up for Grafana Cloud or download and install Grafana.
- Visit your Grafana Cloud user interface (UI) or, if running Grafana locally,
start Grafana and visit
http://localhost:3000
in your browser. - In the left navigation of the Grafana UI, hover over the gear icon to expand the Configuration section. Click Data Sources.
- Click Add data source.
- Select InfluxDB from the list of available data sources.
- On the Data Source configuration page, enter a name for your InfluxDB data source.
- Under Query Language, select one of the following:
Configure Grafana to use Flux
With Flux selected as the query language in your InfluxDB data source, configure your InfluxDB connection:
Under Connection, enter the following:
URL: Your InfluxDB URL.
http://localhost:8086/
Organization: Your InfluxDB organization name or ID.
Token: Your InfluxDB authentication token.
Default Bucket: The default bucket to use in Flux queries.
Min time interval: The Grafana minimum time interval.
Click Save & Test. Grafana attempts to connect to the InfluxDB 2.0 datasource and returns the results of the test.
Configure Grafana to use InfluxQL
With InfluxQL selected as the query language in your InfluxDB data source, configure your InfluxDB connection:
Under HTTP, enter the following:
URL: Your InfluxDB URL.
http://localhost:8086/
Access: Server (default)
Under Custom HTTP Headers, select Add Header. Provide your InfluxDB authentication credentials:
- Header: “Authorization”
- Value: use the
Token
schema and provide your InfluxDB authentication token (for example:Token y0uR5uP3rSecr3tT0k3n
)
Under InfluxDB Details, do the following:
- Database: Enter the ID of the bucket to query in InfluxDB 2.0. To retrieve your bucket ID, see how to view buckets.
- User: Enter the username to sign into InfluxDB.
- Password: Enter the token used to query the bucket above. To retrieve your token, see how to view tokens.
- HTTP Method: Select GET.
Click Save & Test. Grafana attempts to connect to the InfluxDB 2.0 datasource and returns the results of the test.
Query and visualize data
With your InfluxDB connection configured, use Grafana and Flux to query and visualize time series data stored in your InfluxDB instance.
For more information about using Grafana, see the Grafana documentation. If you’re just learning Flux, see Get started with Flux.
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.