I need to query a metric and find out the average value of the metric over a period of 24hrs. But using using avg_over_time
directly on the metric won't work. There is a specific ipaddr
label. The average has to be grouped by each ipaddr
. Now, grouping is not allowed in avg_over_time
. In such case, how can I find out the average of the metric over 24 hrs for each ipaddr
?
The metric and its values are like this
K_utilization{ifName="Ds12:1/0/30",ipaddr="10.1.109.54",node="worker"} 3.5
K_utilization{ifName="Ds65:1/0/4",ipaddr="10.1.5.50",node="worker"} 13.2
K_utilization{ifName="Ds26:1/0/8",ipaddr="10.1.123.58",node="worker"} 3.2
K_utilization{ifName="Ds69:0/0/10",ipaddr="10.1.115.55",node="worker"} 6.2
K_utilization{ifName="Ds71:0/0/21",ipaddr="10.1.25.51",node="worker"} 13.5