@@ -149,6 +149,8 @@ Note: you can add multiple queries to a visualization to plot multiple series on
149149
150150## Variables
151151
152+ For general information on Grafana variables see the [Grafana documentation](https://grafana.com/docs/grafana/latest/reference/templating/)
153+
152154Queries support all Grafana variable substitution syntaxes, for example:
153155
154156` ` ` bash
@@ -157,7 +159,7 @@ $varname
157159${varname: option}
158160` ` `
159161
160- For multi-value variables there is a custom default substitution method, the values will be quoted and seperated with
162+ For multi-value variables there is a custom default substitution method, the values will be quoted and separated with
161163commas, for example:
162164
163165` ` ` bash
@@ -170,6 +172,34 @@ The expected use of multi-value variables is for `in` queries, for example:
170172$serverHost =($host )
171173` ` `
172174
175+ ## DataLinks
176+
177+ Your queries will automatically generate a URL you can use as a DataLink in Grafana,
178+ this link will take you to the logs used to generate your graph in the Scalyr UI
179+
180+ 
181+
182+ To set up the DataLink first click ` Copy` to copy the link into your clipboard
183+
184+ 
185+
186+ Next go to the **Visualization** tab and scroll down to the **Data links** section
187+
188+ 
189+
190+ Click ` Add link` , give it an appropriate title, and paste your URL into the ` URL` field
191+
192+ 
193+
194+ Your Data Link is now ready! If you now go to your graph and click on the line you will
195+ have a new option, this will take you to Scalyr and show the logs your graph represents
196+
197+ 
198+
199+ Note: You will need to already be logged in to Scalyr for the DataLink to reach the UI,
200+ and variables are accepted in DataLinks but there are limitations due to a
201+ [Grafana bug](https://github.com/grafana/grafana/issues/22125)
202+
173203## Limitations and Future Improvements
174204
1752051. Breakdown graphs are currently not supported. These may be supported in the
@@ -181,11 +211,10 @@ $serverHost=($host)
181211 to ***“series”***.
182212
1832133. Complex queries with multiple functions are currently not supported. These may
184- be supported in the future
185-
186- 4. Generated DataLinks only support variables in their default format (With no
187- option passed in) due to limitations in format during variable substitution
188- in DataLinks.
214+ be supported in the future.
215+
216+ 4. The DataLinks feature currently only works for queries without variables due to
217+ a [Grafana bug](https://github.com/grafana/grafana/issues/22125).
189218
190219## Contributing
191220
0 commit comments