Cisco Telemetry : Interface In_octets & Out_Octets_64

Hello,

I’ve been working in InfluxDB 2.1 for a few days now and i need a little help.

I was able to receive information from a Cisco device but i am having issues showing the real time rate of traffic for a specific interface. We receive the “In_octets” and “Out_Octets_64” in bytes every 5 seconds.

How can i represent this in FluxQL type of query ??

Thanks!

Hello @Y4nn1ck,
Can you please share what you measurements, tags, and fields are?
And what you data looks like right now, and what your expected output would be?
Thank you.

Hello @Anaisdg , it’s an pleasure to speak with you :slight_smile: I was actually listening to your “class” on Youtube’s Learn Flux by Example | InfluxDays NA 2021.

Here’s the query that is giving me the amount of data total that he been through an interface ::

from(bucket: "cisco_telemetry")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "Cisco-IOS-XE-interfaces-oper:interfaces/interface/statistics")
  |> filter(fn: (r) => r["_field"] == "out_octets_64")
  |> filter(fn: (r) => r["host"] == "cnq-influxdb")
  |> filter(fn: (r) => r["name"] == "Cable1/0/0")
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> yield(name: "mean")

Here’s a sample of the result it gives me ::

The data is coming in every 5 seconds. What i want to do is calculate the rate at which the data is transferred.

If you need more info, don’t hesitate!

Thanks for your time!