Querying Consul With Grafana

Last updated: Nov 15, 2020


The concern is documenting getting consul queries in grafana

1. variables

1.1. create consul datasource

  • create a variable as a type → select
  • difference is that here, you can use also KEYS (not tree leaves) as values

1.2. create consul query

  • create a variable as a → select as a datasource
  • but how could I create the queries made out of variables — well, most probably
  • you have to be using those, the only variable I can think of is, however, only customer, can you create another one

2. queries

  • You can just query consul
  • here I would like to know now many nodes each client has in their ES cluster

2.1. navigation: no whitespace, relative paths

  • in columns, no spaces are allowed
  • navigate with relative paths

2.2. retrieve key directly

2.3. get selected keys from a parent node

  • either select a leaf such as
  • and then add other leaves to is in columns

2.4. columns

  • seems like that is going from the query
  • so if you query
  • you put the following as columns
  • to have the result of the query as a columns in and of itself, use

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store