How to convert Graphite query to InfluxDB query




I’m collecting SNMP metrics from our router which are saved as incrementing octets (network traffic).
I have Grafana panel “Network Utilization per hour” which display as it says, bandwidth consumption per hour.

Using Graphite we have simple function to achieve this:
summarize(scale(collectd., 60), '1h', 'sum', false)

Could someone help me to convert this Graphite query to InfluxDB query?


Can anyone help me regarding this problem?


This is just another PING :disappointed:


It’s hard to say exactly how you would write this query as I don’t know what your schema looks like. If your graphite names are your measurement name and the field name for the measurement is value, then I something like the following might work:

SELECT SUM(value * 60) FROM collectd. WHERE time > now() - 6hr GROUP BY time(1h)


InfluxGraph can convert Graphite queries directly to Influx queries from a configurable schema optionally based on graphite templates as used by InfluxDB.

Eg, if your schema is:

measurement=snmp with tags ip=, source=collectd, interface=if_octets-ether1,field=tx

Then a template:


will produce appropriate influx queries from the summarize(collectd. <…>) and any other graphite queries. If not using any schema or templates no template configuration is needed.


That’s right!
Thanks, I’ll try your suggestions.