Variables will allow you to apply filters on your dashboards and drilldown links. The Metrics interface variables are indicated with a $.

Metrics interface variables

Add dashboard variables

Before you begin, you’ll need: Metrics in your metrics account.

Add a new dashboard and variable
  • In the Metrics left menu, click .
  • Click in the dashboard toolbar (upper right corner).
  • Select Variables > Add variable.

Add Metrics interface variables

Define the variable

Fill in the form, starting with the General section.

  • Give a short variable Name. This is the placeholder value this variable will use.
  • Set a human-readable Label. This is the filter control at the top of your dashboard.
  • In the Type list, choose Query.
  • We recommend leaving Hide empty.

Variable general settings

Next, fill in the query options.

  • For the Data source, select your Metrics account. (You can look it up here.)
  • We recommend setting Refresh to automatically occur On Dashboard Load.
  • The Query field is where things get really fun. Your query object should start with {"find": "terms"} and contain a field from your Elasticsearch index.

Variable query options

Your query can reference another Metrics interface variable. In this example, $cluster references another variable.

  {"find": "terms", "field": "", "query": "cluster:$cluster"}

Otherwise, the query can be set to a specific field. For example:

  {"find": "terms", "field": ""}
Configure the remaining options and save

You can set the remaining options to whatever makes the most sense for your metrics.

When finished, scroll to the bottom of the page and click Update.

You’re now ready to use the variable in your new dashboard. If you’re looking to configure Explore in kibana drilldown links, click here.