I am running prometheus in my kubernetes cluster. I have the following system in kubernetes:
I have 4 nodes. I want to calculate free memory. I want to have the summation of those four nodes. Then I want to find the maximum over 1 day. So, for example,
at time=t1 node1: 500 MB node2: 600 MB node3: 200 MB node4: 300 MB Total = 1700 MB
at time=t2 node1: 400 MB node2: 700 MB node3: 100 MB node4: 200 MB Total = 1300 MB
at time=t3 node1: 600 MB node2: 800 MB node3: 1200 MB node4: 1300 MB Total = 3900 MB
at time=t4 node1: 100 MB node2: 200 MB node3: 300 MB node4: 400 MB Total = 1000 MB
So, The answer to my query should be 3900 MB. I am not able to do max_over_time for the sum.
I have done like this(which is not working at all):
max_over_time(sum(node_memory_MemFree)[2m])