OPNsense Forum
Archive => 22.7 Legacy Series => Topic started by: vikozo on August 20, 2022, 09:48:21 pm
-
Hello
i have activated telegraf the network traffic part
i found out
there is only one port and no label which port it is! Belive it is the WAN Port, hope so!??
then bytes send and recv are cumulativ!
Packets send and recv are cumulativ, too!
but in the opnSense Gui Reporting Traffic the data looks the way i wish
have a nice day
vinc
-
the Part with the different Ports i found out.
But still the value are cumulative and not what actuality happen
-
That is expected and how Telegraf captures the data from FreeBSD in the case of OPNsense (Telegraf net plugin documentation: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/net/README.md). It is up to you with whatever timeseries database and graphing tool you are using to interpret the metrics using rate of change functions or difference functions to get transfer rates or bytes send/received over a period of time. In my case I have Grafana with Influx 1.8 and use the following queries to get WAN port transfer rates:
Received: SELECT non_negative_derivative(mean("bytes_recv"), 1s) * 8 FROM "net" WHERE ("interface" = 'igb0') AND $timeFilter GROUP BY time($__interval) fill(none)
Sent: SELECT non_negative_derivative(mean("bytes_sent"), 1s) * 8 FROM "net" WHERE ("interface" = 'igb0') AND $timeFilter GROUP BY time($__interval) fill(none)
igb0 is my WAN port.