Skip to content

Commit a8d882e

Browse files
szczyschireia
authored andcommitted
docs: fix docker commands and add extra error troubleshooting information
* Fixed: Docker command should not automatically remove the container on exit * Added: Other helpful docker commands * Added: ssl error fix during yarn build * Fixed: API key link goes to API section of console * Added: Directions to reset time for 5 minute window
1 parent c06f892 commit a8d882e

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ A data source backend plugin consists of both frontend and backend components.
5656
yarn build
5757
```
5858

59+
* **Yarn Error**: If yarn throws `opensslErrorStack`, export this value in the terminal and build yarn again:
60+
61+
```bash
62+
export NODE_OPTIONS=--openssl-legacy-provider
63+
```
64+
5965
### Backend
6066

6167
1. Update [Grafana plugin SDK for Go](https://grafana.com/docs/grafana/latest/developers/plugins/backend/grafana-plugin-sdk-for-go/) dependency to the latest minor version:
@@ -82,14 +88,21 @@ A data source backend plugin consists of both frontend and backend components.
8288
1. Start the docker container
8389

8490
```bash
85-
docker run --rm \
91+
docker run \
8692
--network="host" -e "GF_LOG_MODE=console file" \
8793
-e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=golioth-websocket-datasource" \
8894
-p 3000:3000 \
8995
-v ~/Golioth/Codes/grafana-plugins:/var/lib/grafana/plugins \
9096
--name=grafana grafana/grafana
9197
```
9298

99+
* Notes regarding Docker:
100+
* Restart container after first run: `docker start grafana`
101+
* Restart container after first run as daemon: `docker start grafana`
102+
* Restart container and show the output: `docker start grafana -a`
103+
* Stop the container when running as daemon: `docker stop grafana`
104+
* Remove the container from your system: `docker rm -fv grafana`
105+
93106
2. Load the GUI in your browser:
94107
* [http://localhost:3000](http://localhost:3000)
95108
* user: admin
@@ -109,7 +122,7 @@ A data source backend plugin consists of both frontend and backend components.
109122

110123
* WebSocket Host should use this format: `wss://api.golioth.io/v1/ws/projects/{project-id}`
111124
* Query Parameters key must be `x-api-key`
112-
* Value will be your API key from the [Golioth Console](https://console.golioth.io)
125+
* Value will be your API key from the [Golioth Console](https://console.golioth.io/api-keys)
113126

114127
3. Add a panel to Grafana Dashboard
115128

@@ -130,7 +143,9 @@ A data source backend plugin consists of both frontend and backend components.
130143
* `$.result.data.timestamp`
131144
* `$.result.data.data.temp`
132145

133-
3. Choose "Time series" from the upper right "Visualizations" list.
146+
3. Make sure that Table View is turned off and choose "Time series" from the upper right "Visualizations" list.
147+
148+
4. Choose "Last 5 minutes" from the time selection window in the upper right corner of the graph.
134149

135150
![Graphana Websockets Graph](assets/grafana-websockets-graphing.png)
136151

0 commit comments

Comments
 (0)