title: Grafana: Get the max of max for singlestat
body: <p>I have been searching the web looking for an answer to this, but I cannot seem to find an answer or figure it out.</p>
  <p>I am new to Grafana and I am trying to setup a singestat gauge. I have</p>
  <blockquote>
  <p>16 servers (HPG6-01 to HPG6-16)</p>
  <p>Each server has 8 cores</p>
  <p>Each server has Nagios plugin that sends the maximum temperature across all cores. For instance Core 0-8 temperature for HPG6-01 is T = [33,34,55,45,37,38,46,33], Nagios plugin returns Max-Temp = max(T) = 55</p>
  <p>Performance data is sent to Shinken, which has a plugin for Graphite.</p>
  </blockquote>
  <p>I can plot the current Max-Temp in Grafana which is easy (see the line graph below). But I also want the maximum of Max-Temp across the 16 servers to be displayed as a single stat. For example,</p>
  <blockquote>
  <p>MT = [34, 56, 60, ...] #the Max-Temp for each of the servers</p>
  <p>singlestat = max(MT)</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/bH2MU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bH2MU.png" alt="On the right side, we see the maximum temperature across all cores for each server HPG6-01 to HPG6-16. On the right, I want to show the maximum temperature across all servers (the max of max)" /></a></p>
  <p>The metrics for the single stat is shown in the screenshot below:</p>
  <p><a href="https://i.stack.imgur.com/WwYBy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WwYBy.png" alt="grafana singlestat metrics" /></a></p>
  <p>The options for the single stat is shown below:</p>
  <p><a href="https://i.stack.imgur.com/erxB8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/erxB8.png" alt="grafana single stat options" /></a></p>
  <p>Any ideas on how I can do that? I tried consolidateBy(max) and I get an error &quot;Metric query returns 16 series. Single Stat Panel expects a single series.&quot; because it returns a series instead of a scalar.</p>