Need help in getting total data used for network device

Hi I am using influxdb as source and getting the data from librenms, I am able to create graph for bandwidth utilization for network devices. I really need help in getting the total bandwidth data used a particular time with Each for download and upload.

Welcome to the forum. Can you please share your query that you currently have working?

Have attached the librenms screenshot , it shows the total usage which i want to display on grafana and what iam trying to exaplain.

below is the query I am trying with please let me know if it is wrong.

SELECT mean(“INOCTETS”) FROM “autogen”.“ports” WHERE (“hostname” = ‘’ AND “ifIndex” = ‘19652’) AND $timeFilter GROUP BY time($__interval) fill(none)

I was hoping that you were using Flux, but I see it’s InfluxQL.

Have you considered posting to the Influx forum?