Plugins 〉Haystack
Haystack
Haystack Data Source Plugin
This is a Grafana data source plugin that supports direct communication with a Project Haystack API Server. It handles authentication and supports standard Haystack API operations as well as custom Axon execution.
Some popular servers with Haystack APIs are:
Usage
Create a Data Source
Follow the Grafana instructions to create a new Haystack datasource. Next, fill in the required information:
- The name of the data source.
- The root Haystack API URL. The URLs for some popular Haystack servers are listed below:
- SkySpark:
http://<host>/api/<proj>/
- Haxall:
http://<host>/api/
- NHaystack:
http://<host>/
- SkySpark:
- The username and password. It is best practice to create a dedicated user for the Grafana integration.
Once complete, select Save & Test
. If you get a green check mark, the connection was successful!
Query Data
To query data from the data source, create a dashboard and add a new panel.
Select your Haystack data source in the Data Sources menu. Next, select the type of Haystack query that should be performed (only queries supported by your data source are shown):
- Eval: Evaluate a free-form Axon expression. Note: Not all Haystack servers support this functionality
- HisRead: Display the history of a single point over the selected time range.
- HisRead via filter: Read multiple points using a filter, and display their histories over the selected time range.
- Read: Display the records matching a filter. Since this is not timeseries data, it is best viewed in Grafana's "Table" view.
Variable Usage
Grafana variables can be injected into Haystack queries
using the ordinary syntax,
e.g. $varName
.
We also support a few special variables from the selected time-range:
$__timeRange_start
: DateTime start of the selected Grafana time range$__timeRange_end
: DateTime end of the selected Grafana time range$__maxDataPoints
: Number representing the pixel width of Grafana's display panel.$__interval
: Number representing Grafana's recommended data interval. This is the duration of the time range, divided by the number of pixels, delivered in units of minutes.
To use them, simply enter the value in the input string. Below is an example of using the variables in an Eval query:
> read(temp).hisRead($__timeRange_start..$__timeRange_end).hisInterpolate()
Query Variables
You can use the Haystack connector to source new variables. Create a query and then enter the name of the column that contains the variable values. If no column is specified, the first one is used.
The value injected by the variable exactly matches the displayed value, with the exception of Ref types, where the
injected value is only the ID portion (i.e. the dis name is not included in the interpolation). Multiple-select values
are combined with commas, (red,blue
), but this may be customized using the
advanced variable format options.
Alerting
Standard grafana alerting is supported by this data source.
Support
You can view the code, contribute, or request support on this project's GitHub repo
Grafana Cloud Pro
- $25 / user / month and includes a free trial for new users
- Available with a Grafana Cloud Pro plan
- Access to 1 Enterprise plugin
- Fully managed service (not available to self-manage)
Grafana Cloud Advanced / Grafana Enterprise
- Available with a Grafana Cloud Advanced plan or Grafana Enterprise license
- Access to all Enterprise plugins
- Run fully managed or self-manage on your own infrastructure
Installing Haystack on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Data Source
Use the grafana-cli tool to install Haystack from the commandline:
grafana-cli plugins install
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Configure the Data Source
Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section.
Next, click the Add data source button in the upper right. The data source will be available for selection in the Type select box.
To see a list of installed data sources, click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
Changelog
0.0.11
Minor documentation updates
0.0.10
- Adds a
HisRead with Filter
query type that allows filtering and performing multiple hisReads in one step. - Improves unit detection of historical data.
- Fixes HisRead legend and DataFrame name to reflect the name of the point.
0.0.9
Adds login/retry on a 403 response. This ensures that visualizations are still functional after long periods of inactivity.
0.0.6
Initial release.