title: Grafana - Show metric by field value
body: <p>I'm currently trying to create a graph on Grafana to monitor the status of my servers, however, I can't seem to find a way to use the value of a field as the value to be displayed on the graph. (Datasource is ElasticSearch)</p>
  
  <p>The following "document" is going to be sent to GrayLog (which saves to Elastic) every 1 minute for an array of regions.</p>
  
  <pre><code>{
    "region_key": "some_key",
    "region_name": "Some Name",
    "region_count": 1610
  }
  </code></pre>
  
  <p>By using the following settings, I can get Grafana to display the count of messages it received for each region, however, I want to display the number on the <strong>region_count</strong> field instead.</p>
  
  <p><a href="https://i.stack.imgur.com/NQeFF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NQeFF.png" alt="Grafana Configuratio"></a>
  Result:</p>
  
  <p><a href="https://i.stack.imgur.com/RU4zS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RU4zS.png" alt="Resulting graph"></a></p>
  
  <p>How can I accomplish this? is this even possible using Elastic as the datasource?</p>