Grafana Variables

From Knowledge Center
Revision as of 04:47, 25 November 2018 by Ruan (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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"}