<p>Is there any query to get bytes transmitted rate, of the traffic which is out of the node to a remote peer? For pod also, I need the traffic which goes outwards from the pod, through the node, and outwards from the node. I suppose the usual &quot;container_network_transmit_bytes_total&quot; and &quot;node_network_transmit_bytes_total&quot; give the total bytes transmitted to all destinations. For example, if two pods are running on the same node and communicating with each other, I do not want to count that traffic.</p>

user22058606
<p><strong>Try using the following queries:</strong></p>
<pre><code>sum(irate(node_network_receive_bytes_total[1m])) by (instance)

irate(container_network_transmit_bytes_total{name=&quot;redis&quot;}[1m])
</code></pre>
<p>Where irate(v range-vector) calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for.</p>
<p>You can find more information in this <a href="https://prometheus.io/docs/prometheus/latest/querying/functions/#irate" rel="nofollow noreferrer">Official doc</a>.</p>
