anryko / grafana-influx-dashboard

Grafana InfluxDB scripted dashboard
MIT License
132 stars 44 forks source link

Suggested retention/CQ scheme for rollups? #55

Closed lawre closed 7 years ago

lawre commented 8 years ago

I would really like to take advantage of influxdb's retention policy and continuous queries to create rollups for grafana graphs. Does anyone have a suggested scheme to go along with the grafana-influx-dashboard model?

Links to other posts/issues would be good as well, but my google-fu is either not working well, or rollups are too new a feature to have been explored properly. Thanks.

lawre commented 8 years ago

It looks like in order to effectively implement CQ for something as dynamic as collectd, influxdb will need to support wildcards for CQs. These are two related issues on the influxdb to provide support for this:

Actual Pull Request for this feature: Support cast syntax for selecting a specific type https://github.com/influxdata/influxdb/pull/6529 (This was submitted 10 or so days ago)

Another issue asking for this feature: Wildcard support for fields in continuous queries https://github.com/influxdata/influxdb/issues/5750

Do you agree?

nordewal commented 8 years ago

For auto selecting the correct RP you can use the following proxy in front of influxdb. It's the only working way as of now (AFAIK): https://github.com/Lupul/influxdb-grafana-rp-proxy/blob/master/influxdb_grafana_rp_proxy.py

I actually modified it a bit that the RP selection is not based on the group by time, but rather on the 'where time >' clause. So that it get selects the optimal RP based on the earliest data point requested. If I find some time to clean it up, I'll do PR in the other repo.

forsberg commented 8 years ago

@nordewal Did you find that time? I would be interested to see that version of the code :-)

lawre commented 8 years ago

@anryko The above referenced PR And Issue have been closed and merged in. Is there any refactoring of this dashboard needed to take advantage of rollups? I plan on carving out some time this week to mess around with it.

anryko commented 7 years ago

@lawre hey! I somehow completely missed your comment... sorry for that. Have you figured things out? Do you still need any help with this?