New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stackdriver: Template variables in filters using globbing format #15182
Comments
Looks like the format is not specified in the replace (interpolation) call: There is a 3rd optional argument to replace that controls how multi-valued variables will be interpolated. Looks like for filters it should be |
Also, it is possible to change how multi variables are concatenated. Docs here. In your case it would be: ${device:regex} But fix coming up that changes the default to be regex for filters. |
For the filter expression, a better default is to interpolate multi variables as a regex rather than the default globbing pattern. Also, uses the real TemplateSrv class rather than stubbing it in the tests.
Changes default interpolation for Stackdriver filter to be regex. Fixes #15182
* grafana/master: (23 commits) changelog: adds note for grafana#15182 stackdriver: fixes grafana#15182 Closing timepicker when clicking outside the picker Optimized so we only do checks when dropdown is opened stackdriver: add some more typings Fixed so that we close angular TimePicker when user clicks outside the dropdown Fixes grafana#15223 by handling onPaste event because of bug in Slate docs: fixes grafana#14940 added missing typing to explore props improve the stackdriver logo Fixed so onBlur event trigger an QueryChange and QueryExecute if values differ Renamed initialQueries to queries Missed to save Fixed bug with removing a QueryRow thats not part of nextQueries Replaced intialQueris with queryKeys Reverted redux-logger Added more typings Removed modifiedQueries from state Merge with master Refactor of action, actionTypes and reducer ...
* grafana/master: (977 commits) changelog: add notes about closing grafana#15265 Added ServerlessDatabaseCapacity metric to list of AWS RDS metrics. changelog: add notes about closing grafana#8207 cloudwatch: Add tests for resource_arn template query cloudwatch: Add resource_arns template query function Implements feature request grafana#8207 update to aws-sdk-go v1.16.15 Updated add panel related flows changelog: adds note for grafana#15182 stackdriver: fixes grafana#15182 Closing timepicker when clicking outside the picker Optimized so we only do checks when dropdown is opened stackdriver: add some more typings Fixed so that we close angular TimePicker when user clicks outside the dropdown Fixes grafana#15223 by handling onPaste event because of bug in Slate minor layout change, simple render test docs: fixes grafana#14940 added missing typing to explore props improve the stackdriver logo Fixed so onBlur event trigger an QueryChange and QueryExecute if values differ Renamed initialQueries to queries ...
We're running Grafana 5.4.3. I created a variable $device that I want to use to filter all of the graphs on the dashboard by a particular device. I set up the template variable as so:
I thought I could then do:
But the graph shows no data points. It looks like it's sending the variable with
{}
around it:Specifically:
["metric.label.device_name","=~","{william-mongo-sessions-ssd}"]
when I believe it should just have been["metric.label.device_name","=~","william-mongo-sessions-ssd"]
Finally, are variables supported in the template queries? We typically have a hierarchy as so:
Where selecting zone will filter instances and devices. Selecting an instance will filter devices. I don't see a way in the template query page to add a filter.
The text was updated successfully, but these errors were encountered: