Setting up the InfluxDB database
Here, we’ll log in to our InfluxDB server, set it up with an initial account and bucket, and generate an API key so we can connect to it from our Python script and the Grafana data source.
Initializing the InfluxDB server
Log in to the InfluxDB UI at http://localhost:8086. If you haven’t already set up the instance, you’ll see a prompt to perform the initialization:
- Set the username to whatever you like.
- Add a password (8 characters minimum).
- Choose an organization name:
LearnGrafana
. - Create a bucket:
Chapter08
.
Generating an API token
You’ll need to generate a new token in order to access the InfluxDB server from our script:
- Click on Load Data | API Tokens.
- Click the gear icon on the right side of the user you created previously and select Clone.
- Click on Copy to clipboard to copy the API token string.
- Save the API token in a safe place as you won’t be able to...