Reputation: 167
I have been searching the web looking for an answer to this, but I cannot seem to find an answer or figure it out.
I am new to Grafana and I am trying to setup a singestat gauge. I have
16 servers (HPG6-01 to HPG6-16)
Each server has 8 cores
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
Performance data is sent to Shinken, which has a plugin for Graphite.
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,
MT = [34, 56, 60, ...] #the Max-Temp for each of the servers
singlestat = max(MT)
The metrics for the single stat is shown in the screenshot below:
The options for the single stat is shown below:
Any ideas on how I can do that? I tried consolidateBy(max) and I get an error "Metric query returns 16 series. Single Stat Panel expects a single series." because it returns a series instead of a scalar.
Upvotes: 2
Views: 5794
Reputation: 28629
I like to use the highestMax
function for this.
highestMax(HPG6*.shinken.Core_Temp.Max-Temp, n)
This function will only show n
number of series that have the highest values; for your use-case, I would just use 1
, to get the absolute maximum value across all series.
This will show the series with the absolute maximum value across the selected time frame. To see the highest current value, use just that,
Upvotes: 2