Difference between revisions of "Grafana Variables"

From Knowledge Center
Jump to: navigation, search
(Created page with "Create variables in grafana to drill down into the data your are looking for with select picker options. '''Hostname Variable''' Create a <code>hostname</code> variable <pr...")
 
(No difference)

Latest revision as of 04:47, 25 November 2018

Create variables in grafana to drill down into the data your are looking for with select picker options.

Hostname Variable

Create a hostname variable

{"find": "terms", "field": "host.name"}

In your query you can use it as:

host.name:$hostname AND metricset.name:status

Host and Process

If you want to group all data for a client, and the processes for the selected service:

Template variable host for a client:

{"find": "terms", "field": "host.name", "query":"fields.client_name:example1"}

Template variable processes per hostname:

{"find": "terms", "field": "system.process.name", "query": "host.name:$hostname"}