Dashboard URL Variables
FojiSoft can apply variable values passed as query parameters in dashboard URLs.
Passing variables as query parameters
FojiSoft interprets query string parameters prefixed with var- as variables in the given dashboard.
For example, in this URL:
https://${your-domain}/path/to/your/dashboard?var-example=value
The query parameter var-example=value represents the dashboard variable example with a value of value.
Passing multiple values for a variable
To pass multiple values, repeat the variable parameter once for each value:
https://${your-domain}/path/to/your/dashboard?var-example=value1&var-example=value2
FojiSoft interprets var-example=value1&var-example=value2 as the dashboard variable example with two values: value1 and value2.
Adding variables to dashboard links
FojiSoft can add variables to dashboard links when you generate them from a dashboard’s settings.
Passing ad hoc filters
Ad hoc filters apply key/value filters to all metric queries that use a specified data source.
To pass an adhoc filter as a query parameter, use the variable syntax to pass the ad hocfilter variable, and also provide the key, the operator as the value, and thevalue as a pipe-separated list.
For example, inthis URL:
https://${your-domain}/path/to/your/dashboard?var-adhoc=example_key|=|example_value
The query parameter var-adhoc=key|=|value applies the ad hoc filter configured as the ad hoc dashboard variable using the example_key key, the = operator, and the example_value value.
Note: When sharing URLs with ad hoc filters, remember to encode the URL. In the above example, replace the pipes (|) with %7C and the equality operator (=) with %3D.
Example
https://example.host.local/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica
This passes the ad hoc filter variable ad hoc with the filter value datacenter = America.
Controlling time range using the URL
To set a dashboard’s time range, use the from, to, time, and time.window query parameters.Because these are not variables, they do not require the var- prefix