Grafana Variables

From Knowledge Center
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"}