<p>I need to know the data traffic of one of my kubernetes nodes in a specific month.</p>
<p>This query gives me metrics for the last 30 days and the value is in MiB/s</p>
<pre><code>fetch k8s_node
| metric 'kubernetes.io/node/network/received_bytes_count'
| align rate(30d)
| every 30d
| group_by ['node_name'],
    [value_received_bytes_count_aggregate:       aggregate(value.received_bytes_count)]
</code></pre>
<p>How can I get this value in bytes and specify a month(only February of 2023 for example)</p>
<p>Thank you</p>

Thiago Gabriel Leite Ferreira
<p>Try with below code:</p>
<pre><code>fetch k8s_node 
| metric 'kubernetes.io/node/network/received_bytes_count' 
| filter (time&gt;=’2023-02-01T00:00:00Z’ and time&lt;’2023-03-01T00:00:00Z’)
| align rate(1m) 
| every 1d 
| group_by ['node_name'], 
[value_received_bytes_count_aggregate: aggregate(value.received_bytes_count)]
</code></pre>
<p>By adding the filter clause we can limit the data only for the month February 2023. Check this <a href="https://dataschool.com/learn-sql/dates/" rel="nofollow noreferrer">document for Date and Time Functions</a></p>
