-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for dot separated measurements #69
Conversation
Add topic as a tag enabling further functionality in grafana
Thanks for the PR @kvesterling, let me please dig into this a bit deeper. Since it's gonna break everything, I am not going to merge this as is, but I think it would be a great addition while preserving backwards compatibility in a reasonable way. Let me please investigate how to move this forward... |
It does break the grafana dashboards, BUT it's worth the pain. I've already rebuilt the majority of them. Easy fix if you just do a replace in the JSON, then it's just a few things after that. BUT much gets easier. Let me know what you need fixed. |
Adding a note for myself how this is supposed to work. If you structure your InfluxDB measurements in a way that the I am not convinced this is a way to go, as (AFAIK) general InfluxDB recommendation is to keep the number of measurements as low as possible and add as many tags as you wish to add necessary dimensions. |
@kvesterling Sorry for my late reply. Could you please post perhaps couple more screenshots where and how you use the measurements with dots to actually compose a query and where having Also what do you actually get by copying the measurement name itself into another tag? I'm not seeing the benefit immediately. As a side note, one of the main goals of Venus Grafana integration is to allow people to easily explore all the measurements available and make panels out of them easily - without necessarily knowing what is out there. InfluxDB data source query builder is helping this with measurement autocomplete, but we have been bitten by victronenergy/venus-docker-grafana#8 since day zero until today, and I think if we affect how measurements are named, it would be great to help address this issue as well. Unfortunately given how measurement auto complete is implemented (https://github.com/grafana/grafana/blob/8f38ef70ceaea12ca27bc0d856951e6e036da115/public/app/plugins/datasource/influxdb/influxql_query_builder.ts#L62) I do not see an easy way to do it. For now please add couple more examples how separating measurement components with dots actually helps you. I stand my initial comment though, we are not gonna break anyones dashboards, if we merge this, it will be a configurable option - perhaps default for new releases but with backwards compatibility. Thanks for your understanding. |
@kvesterling I understand the benefit of using dots in the measurement, was just curious to see more examples like your Could I also ask what is the reason of adding the measurement as additional And yes, for the autocomplete, the current implementation is to return first 100 rows that match what you type in and because we have currently a lot of measurements, the autocomplete only displays the beginning. My thinking is around the lines of displaying top level categories, and perhaps first subcategory (up to a second delimiter) so that you can quickly skim though the available tree of all measurements. But as I said, that's just an unrelated side note. |
I have created issue #82 to discuss this in further detail. Please move the discussion there. |
Superseded by #98 |
Add topic as a tag enabling further functionality in grafana.
Use a dot in the measurement instead of / such that we can use $1,$2,$3, etc for aliases in Grafana.
This will break a lot of dashboards currently in use, but the benefits outweigh the little bit of work to straighten it out.