Hi,
I’m having some difficulties to display some values and to interprete them.
My setup is :
sFlow RT and Prometheus Exporter (to export network metrics in bits/sec) => Prometheus (where metrics are created/filtered) => Grafana (to display metrics, in Gbits/sec)
Prometheus sFlow metrics is kind of simple. This exporter allow to retrieve bits/sec value for every VLAN
- job_name: 'sflow-rt-flow-vlan-ingress'
metrics_path: /app/prometheus/scripts/export.js/flows/ALL/txt
static_configs:
- targets: ['my_prometheus:8008']
params:
metric: ['vlan-metric-ingress']
key: ['vlan']
label: ['vlan']
value: ['bytes']
scale: ['8']
minValue: ['1000']
maxFlows: ['100']
filter: ['direction=ingress']
From this data, i built a dashboard to display per-VLAN throughput on a network uplink, i.e :
Then, I’d like to get the total amount of data per VLAN in a table to properly identify which VLAN consumes the more data for a timeslot.( i.e, we can have VLAN with constant low throughput vs VLAN with high peak throughput)
In order to achieve this, I was considering using rate or increase function, however it seems I got some extravagant values.
- Using “rate” query :
sum by(vlan) (rate(vlan_metric_ingress[1h]))
If I understood, it means it evaluates the average by vlan over the last hour
Grafana table look like this :
- Then, using the “increase” query :
sum by(vlan) (increase(vlan_metric_ingress[1h]))
If I understood, the increase function calculates the total counter’s value over the last hour.
My question is I’m not sure to 100% understand the main difference between them, and I don’t know which function is the right to use (or probably there’s another way of doing this ? )
Bonus question :
If I use increase function with 1h time range, how the result is calculates when Grafana UI timeslot is 3 last hours ?