<p>I am trying to measure the amount of network traffic usage in my Kubernetes cluster and set limits for my containers based on their network usage. I am using Prometheus to collect metrics, and I need help with a PromQL query that can calculate the total network traffic received bytes over a specific time frame.</p>
<p>What would be the PromQL query to fetch the total network traffic received bytes over a specific time frame?</p>

Hesam Norin
<p>You might want to try <a href="https://prometheus.io/docs/prometheus/latest/querying/functions/#increase" rel="nofollow noreferrer">increase</a> function for metric which measures the amount of sent bytes. Specify the interval you want to measure on in square brackets. For example, <code>increase(network_bytes_sent_total[1h])</code> will return the increase of network_bytes_sent_total metric between now() and now()-1h.</p>
