Plugins 〉Haystack
Haystack
<!-- This README file is going to be the one displayed on the Grafana.com website for your plugin -->
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, which is supported by SkySpark and Haxall.
Usage
Create a Data Source
To create a new data source, select Data Sources
from the Configuration menu represented by the gear icon on the left
panel. Click Add Data Source
, and then select Haystack
from the list. Next, fill in the name of the data source,
the API URL, and the credentials to use to access the data. It is typically a good idea to create a dedicated user
to access the data. 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 new panel in a dashboard. If you do not have any dashboards yet, create
one by selecting + New Dashboard
from the Dashboard menu in the left panel.
Once within the panel editor, select your Haystack data source in the Data Sources menu. Next, select the type of Haystack query that should be performed. The supported queries are:
- 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.
- Read: Display the records matching a filter. Since this is not timeseries data, it can only be viewed in Grafana's "Table" view.
Variable Usage
Grafana template variables can be injected into queries using the ordinary syntax, e.g. $varName
.
We also support injecting a few special variables from the time-range selector into the Eval and Read requests:
$__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:
> [{ts: $__timeRange_start, v0: 0}, {ts: $__timeRange_end, v0: 10}].toGrid
Query Variables
You can use the Haystack connector to source variables. Create a query and then enter 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.
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
1.0.0 (Unreleased)
Initial release.