|
2 | 2 |
|
3 | 3 | [](https://github.com/grafana/grafana-starter-datasource/actions?query=workflow%3A%22CI%22)
|
4 | 4 |
|
5 |
| -This plugin provides a data source to connect a REST API to [nodegraph](https://grafana.com/docs/grafana/latest/visualizations/node-graph/) panel of Grafana. |
| 5 | +This plugin provides a data source to connect a REST API to [nodegraph](https://grafana.com/docs/grafana/latest/visualizations/node-graph/) panel of Grafana. It is [signed and published by Grafana](https://grafana.com/grafana/plugins/hamedkarbasi93-nodegraphapi-datasource/). |
6 | 6 |
|
7 | 7 | 
|
8 | 8 |
|
| 9 | +## Requirements |
| 10 | +- **Grafana 7.5+** |
| 11 | + |
9 | 12 | ## Getting started
|
10 | 13 |
|
11 |
| -1. Use Grafana 7.4 or higher |
| 14 | +### Installation via grafana-cli tool |
12 | 15 |
|
13 |
| -- Download and place the data source in `grafana/plugins` directory. |
| 16 | +Use the grafana-cli tool to install Node Graph API from the commandline: |
14 | 17 |
|
15 |
| -This plugin is not signed yet; Grafana will not allow loading it by default. You have to enable it by adding: |
| 18 | +```bash |
| 19 | +grafana-cli plugins install hamedkarbasi93-nodegraphapi-datasource |
| 20 | +``` |
16 | 21 |
|
17 |
| -for example, if you are using Grafana with containers, add: |
| 22 | +The plugin will be installed into your grafana plugins directory; the default is `/var/lib/grafana/plugins`. [More information on the cli tool](https://grafana.com/docs/grafana/latest/administration/cli/#plugins-commands). |
18 | 23 |
|
19 |
| -```yaml |
20 |
| --e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=hamedkarbasi93-nodegraphapi-datasource" |
21 |
| -``` |
| 24 | +### Installation via zip file |
| 25 | + |
| 26 | +Alternatively, you can manually download the [latest](https://github.com/hoptical/nodegraph-api-plugin/releases/latest) release .zip file and unpack it into your grafana plugins directory; the default is `/var/lib/grafana/plugins`. |
22 | 27 |
|
23 |
| -2. You can now add the data source. Just enter the URL of your API app and push "Save & Test." You will get an error in case of connection failure. |
| 28 | +### Plugin Configuration |
24 | 29 |
|
25 |
| - > Note: The browser should have access to the application, not the Grafana server. |
| 30 | +You can now add the data source. Just enter the URL of your API app and push "Save & Test." You will get an error in case of connection failure. |
| 31 | + |
| 32 | +> Important note: The browser should have access to the application, not the Grafana server. |
26 | 33 |
|
27 | 34 | 
|
28 | 35 |
|
29 |
| -3. In the Grafana dashboard, pick the Nodegraph panel and visualize the graph. |
| 36 | +In the Grafana dashboard, pick the Nodegraph panel and visualize the graph. |
30 | 37 |
|
31 | 38 | ## API Configuration
|
32 | 39 |
|
@@ -178,9 +185,9 @@ The application will be started on `http://localhost:5000`
|
178 | 185 |
|
179 | 186 | ## Query Configuration
|
180 | 187 | You can pass a query string to apply for the data endpoint of the graph via *Query String*. Like any other query, you can utilize variables too:
|
181 |
| - |
| 188 | + |
182 | 189 | 
|
183 |
| - |
| 190 | + |
184 | 191 | With variable `$service` defined as `processors`, above query will produce this endpoint:
|
185 | 192 | `/api/graph/data?query=text1&service=processors`
|
186 | 193 | ## Compiling the data source by yourself
|
@@ -209,6 +216,10 @@ You can pass a query string to apply for the data endpoint of the graph via *Que
|
209 | 216 | yarn build
|
210 | 217 | ```
|
211 | 218 |
|
| 219 | +## Roadmap |
| 220 | + |
| 221 | +- Convert the plugin to a backend data source. This will prevent the client browser necessity to connect to the API server. |
| 222 | + |
212 | 223 | ## Learn more
|
213 | 224 |
|
214 | 225 | - [Build a data source plugin tutorial](https://grafana.com/tutorials/build-a-data-source-plugin)
|
|
0 commit comments