Skip to content

Commit

Permalink
doc: update Grafana instructions
Browse files Browse the repository at this point in the history
Add note about InfluxDb version. Update authentication instructions.
  • Loading branch information
tkurki committed Nov 4, 2024
1 parent b4cffed commit d12a817
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ Remember to click "Submit" to save your configuration!

## Configuring the Grafana Data Source

While technically not in the scope of this plugin, this section describes how to set up an InfluxDB data source in Grafana. (Another option would be to use the experimental [signalk-grafana data](https://github.com/tkurki/signalk-grafana) data source.)
While technically not in the scope of this plugin, this section describes how to set up an InfluxDB data source in Grafana. (Another option would be to use the experimental [signalk-grafana data](https://github.com/tkurki/signalk-grafana) data source.) These settings have been tested with InfluxDB 2.7.10, earlier versions may or may not work.

These instuctions configure an InfluxDb datasource using InfluxQL as the query language against InfluxDb version 2. InfluxQL is a good choice as the query language because the Grafana datasource includes a UI for building queries by picking database fields instead of manually writing the raw query.

To begin with you will need to [create an API token in InfluxDB](https://docs.influxdata.com/influxdb/v2/admin/tokens/create-token/).

Login to Grafana. On Signal K installations, Grafana often runs on port 3001: http://mysignalkhostname:3001/

Expand All @@ -65,19 +69,15 @@ Create the data source:
- Query language: InfluxQL
- HTTP URL: http://localhost:8086

To authenticate, you need to add a custom HTTP header:

- Header: Authorization
- Value: Token (token you created when configuring InfluxDB)

Use the following settings:
Use the following InfluxDB Details:

- Database: (your bucket name)
- HTTP Method: GET
- Min time interval: 1s
- Database: `your bucket name`
- User: `your influxdb user`
- Password: `your API Token`
- HTTP Method: either `GET` or `POST`

Then click "Save & test".
After a short while, you should get a positive acknowledgment. Now, you can create dashboard panels that use InfluxDB as the data source.
You should get a positive acknowledgment. Now, you can create dashboard panels that use InfluxDB as the data source.

# History API

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2'
services:
influxdb:
container_name: influx2
image: "influxdb:2.3"
image: "influxdb:2.7.10"
ports:
- "8086:8086"
volumes:
Expand Down

0 comments on commit d12a817

Please sign in to comment.