title: How to get the average over time only during the day in Prometheus
body: <p>I'm currently trying to get the average percentage usage of RAM in the last month with the following query :</p>
  
  <pre><code>100 - ((avg_over_time(node_memory_MemAvailable_bytes{instance="...",job="..."}[4w]) * 100) / node_memory_MemTotal_bytes{instance="...",job="..."})
  </code></pre>
  
  <p>The query is working correctly, but now I would like to filter out the values that were collected during the night, in order to have a real usage percentage during the day : is it possible to get the average of the values collected only between 8AM and 8PM ?</p>
  
  <p>Thanks in advance !</p>
  
  <p>Mathias</p>