Is there a way to get from a field value ( like "devices_connected"), seperated by a term (like "servers") ... the sum of that?
Example:
There are 3 servers sending connected device information into elasticsearch
//1sec
devices_connected{server="clustermember.node1",devicetype="android"} 1
devices_connected{server="clustermember.node2",devicetype="android"} 0
devices_connected{server="clustermember.node3",devicetype="android"} 0
//2sec later
devices_connected{server="clustermember.node1",devicetype="android"} 2
devices_connected{server="clustermember.node2",devicetype="android"} 0
devices_connected{server="clustermember.node3",devicetype="android"} 0
//3sec later
devices_connected{server="clustermember.node1",devicetype="android"} 5
devices_connected{server="clustermember.node2",devicetype="android"} 0
devices_connected{server="clustermember.node3",devicetype="android"} 1
//4sec later
devices_connected{server="clustermember.node1",devicetype="android"} 5
devices_connected{server="clustermember.node3",devicetype="android"} 2
devices_connected{server="clustermember.node3",devicetype="android"} 20
Have tested this in Kibana with all available options.
Result is a visualization of TSVB:
Aggregation: Max of "devices_connected"
Group by: Terms by "prometheus.labels.server.keyword"
Sum: ... not available?
Results in:
A stacked visualization available showing 3 lines (one per server), but not the sum only.
Expectation:
One line only is visible, showing the sum of all connected deviced on the system.
(similar in case of Gauge usage to show only the sum in the Gauge, not having 3 Gauges, one per server)
//1sec
1
//2sec later
2
//3sec later
6
//4sec later
27
In Kibana there is no way to add a Sum behind the Terms aggregation. Is this right? Should I do something completely different?



