Did you know? URL parameters
If you're on this blog you've probably been around the Elastic stack for awhile. Remember Kibana 3? A little known feature of Kibana 3 was the ability to create "scripted" dashboards. You could use URL parameters to inject strings into the dashboard JSON, but there were all sorts of limitations. For example, scripted dashboards had to be store on disk. In Canvas you can use URL parameters anywhere in an expression.
Obviously you should be careful here, string concatenation and such, but it's a pretty sweet feature. The
urlparam function will grab a
specified URL parameter and return it in you expression, for use by any other function, or just on its own. You can also specify a default
if said URL parameter is missing. Check out the screenshot to see how it works.