1- # Grafana Datasource Plugin for Project Haystack
1+ # Grafana Data Source Plugin for Project Haystack
22
33This is a [ Grafana] ( https://grafana.com/grafana/ ) plugin that supports direct communication with a
44[ Project Haystack API Server] ( https://project-haystack.org/doc/docHaystack/HttpApi ) . It handles authentication
@@ -10,48 +10,14 @@ and supports standard Haystack API operations as well as custom Axon execution,
1010To use this package, you should already have a working Grafana server. For instructions on how to install and configure
1111Grafana, see [ here] ( https://grafana.com/docs/grafana/latest/ )
1212
13- ### Installation
13+ For more usage information, see the [ plugin readme ] ( ./src/README.md )
1414
15- TODO
15+ ## Contributing
1616
17- ### Create a Data Source
17+ Contributions are very welcome! For details on how to develop this plugin, see the
18+ [ development guide] ( ./DEVELOPMENT_GUIDE.md ) .
1819
19- To create a new data source, select ` Data Sources ` from the Configuration menu represented by the gear icon on the left
20- panel. Click ` Add Data Source ` , and then select ` Haystack ` from the list. Next, fill in the name of the data source,
21- the API URL, and the credentials to use to access the data. It is typically a good idea to create a dedicated user
22- to access the data. Once complete, select ` Save & Test ` . If you get a green check mark, the connection was successful!
23-
24- ### Query Data
25-
26- To query data from the data source, create a new panel in a dashboard. If you do not have any dashboards yet, create
27- one by selecting ` + New Dashboard ` from the Dashboard menu in the left panel.
28-
29- Once within the panel editor, select your Haystack data source in the Data Sources menu. Next, select the type of
30- Haystack query that should be performed. The supported queries are:
31-
32- - Eval: Evaluate a free-form Axon expression. Grafana variables may be injected into the query, with the supported
33- variables listed below. * Note: Not all Haystack servers support this functionality*
34- - HisRead: Display the history of a single point over the selected time range.
35- - Read: Display the records matching a filter. Since this is not timeseries data, it can only be viewed in Grafana's
36- "Table" view.
37-
38- #### Variables
39-
40- Some queries support injecting values from the Grafana UI. The following variables are supported:
41-
42- - ` $__timeRange_start ` : DateTime start of the selected Grafana time range
43- - ` $__timeRange_end ` : DateTime end of the selected Grafana time range
44- - ` $__maxDataPoints ` : Number representing the pixel width of Grafana's display panel.
45- - ` $__interval ` : Number representing Grafana's recommended data interval. This is the duration of the time range,
46- divided by the number of pixels, delivered in units of minutes.
47-
48- To use them, simply use the value in the input string like this:
49-
50- ```
51- [{ts: $__timeRange_start, v0: 0}, {ts: $__timeRange_end, v0: 10}].toGrid
52- ```
53-
54- # Continuing Work
20+ ## Continuing Work
5521
5622* [ ] Publish plugin
5723* [ ] Consider enabling multi-point hisRead (through filters)
0 commit comments