How do you add a query for data grouped by a regex in influxdb to grafana?

3.7k views Asked by At

So my main goal is to build a graph that charts how much data I've went through in a month in grafana (I'm on a comcast line).

Month is not a time period however that influxdb's GROUP BY time() function supports. The documentation I looked at. From here it looks like the longest time period is a week, likely because it doesn't change like a month does.

However I noticed that all my time stamps use the same format (it would be weird if they didn't I guess). I know that influxdb supports regex FROM and WHERE statements, but does it support GROUP BY? If it did, I could use something like "/-([^-]+)-/" to query timestamps like 2016-12-18T08:25:50Z and group by that? Or does influxdb support nested queries?

edit: looks like I was looking at .9. I edited to 1.1 but didn't edit anything about my question.

GROUP BY time() queries group query results by a user-specified time interval

I'm not really sure how that would work for a month considering that my length of time changes?

1

There are 1 answers

3
Michael Desa On

No version of InfluxDB supports GROUP BY <regular expression>, but as on 1.2 subqueries will be supported.