I’m writing ifHCOutOctets values from two routers into a single influxdb table using telegraf. my requirement is to show aggregate traffic from one interface from router 1 & one interface from router 2. How can i do that in grafana ?
Hi @nskshalutha,
Can you share with us more infromation about this inquiry?
- Do you use Influx QL (v. 1.x) or Flux language (v.2.x+)?
- Can you share a picture of _measurement, _field and tags or can you share data with us (if not confidential)? Does data look like that?:
network-interfaces,agent_host=1.2.3.4,host=node.domain.tld,hostname=device.host.name,ifDescr=xe-0/0/19 ifHCInOctets=10398374903i,ifHCOutOctets=571882926i 1565784776000000000
- What exactly do you mean by “show aggregate traffic”? Do you only want to show 2 time series on same graph or do you want to do some calculation with data? Do you want to show
sum
of ifHCOutOctets for each hostname (i.e. router)? - Can you share what queries you tried?
By providing us more information there is a greater chance that somebody will provide you a solution that would help in solving your case.
Best regards,
ldrascic
Hi ,
Thank you for the reply.
I’m building a grafana dashboard. My database is influxdb . and I’m writing snmp data to influxdb measurements tables using telegraf.
I can build graphs like this ( No problem with that)
1675484490 -->Router1 → interface1/1 → 12 Gbps
1675484490–> Router 2–> interface1/1 —> 7 Gbps
My requirement is to make a line graph like this
1675484490–>Total Bandwidth → Both Interfaces -->19 Gbps
Here is my query for a single router
SELECT non_negative_derivative(mean("ifHCOutOctets"), 1s) *8 / 1000000000, non_negative_derivative(mean("ifHCInOctets"), 1s) *8 / 1000000000 FROM "HuaweiRouter" WHERE ("agent_host" = '10.24.1.X' AND "Interface" = 'Eth-Trunk32') AND $timeFilter GROUP BY time($__interval), "Interface" fill(null)
Kindly provide a solution for this
I found this query online but it doesnt work
SELECT 8 * (non_negative_derivative(mean("inoctets1"), 1s )
+ non_negative_derivative(mean("inoctets2"), 1s ))/1000000000
AS "Interface_Traffic_IN"
FROM (
SELECT "value"
AS "inoctets1"
FROM "HuaweiDataAGG"
WHERE "agent_host" = '10.24.1.X2' AND "Interface" = 'Eth-Trunk32'
), (
SELECT "value"
AS "inoctets2"
FROM "HuaweiDataAGG"
WHERE "agent_host" = '10.24.1.X1' AND "Interface" = 'Eth-Trunk32'
)
GROUP BY time($__interval), "Interface" fill(null);
Hi,
Can you please provide an update on this. It will be really helpful
Regards
Niranga
Any update please…!! May i know whether this is possible from influxQL or not ?