Skip to content
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

Feature Request: Support dotted syntax in measurement name #82

Open
mman opened this issue Apr 22, 2024 · 7 comments
Open

Feature Request: Support dotted syntax in measurement name #82

mman opened this issue Apr 22, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@mman
Copy link
Collaborator

mman commented Apr 22, 2024

As suggested in the PR: #69

It may be a nice addition to support storing the measurements into InfluxDB with dotted syntax which then allows to dynamically access parts of the measurement name within the query itself.

so the pvinverter/Ac/L1/Power would become pvinverter.Ac.L1.Power.

Since all measurements are properly tagged with portalId, and instanceNumber, the immediate benefit I can see at the moment is to group by a phase in all three phase measurements where each phase is represented separately. So one query can be used to easily visualise voltate/amperage/power of a three phase measurement as opposed to three queries required currently.

Since the change would break all existing dashboards out there, it must be an opt in. My suggesting would be to add it as an option to the Admin Dashboard Settings/InfluxDB page. Something along the lines of

Measurement Separator: Slash (/) - Example: pvinverter/Ac/L1/Power
Measurement Separator: Dot (.) - Example: pvinverter.Ac.L1.Power

with proper explanation of how the dotted format can be used later in the InfluxDB query.

Screenshot 2024-04-22 at 12 06 54
@kvesterling
Copy link

kvesterling commented Apr 22, 2024

"with proper explanation of how the dotted format can be used later in the InfluxDB query." I'm not sure what you mean by this, it's functionality in Grafana is why I'm requesting the "feature". It's merely a measurement name, influx would care less if it were dots, slash, or otherwise. If you're concerned about regex for the measurement, simply escape the dot with \.

@mman
Copy link
Collaborator Author

mman commented May 29, 2024

@kvesterling Any comments about the PR and how I propose the feature to be implemented? It's not gonna be ON by default due to compatibility reasons, so it will be opt-in for now... what do you think: #98

@mman
Copy link
Collaborator Author

mman commented Jun 6, 2024

Possibly/Probably related to #114

@kvesterling
Copy link

kvesterling commented Jun 6, 2024

Thanks! I don't have any comments to say, I'd be happy to contribute my dashboards with the feature enabled to make it easy for those whom would like the dot formatted.

@maurerle
Copy link
Contributor

maurerle commented Nov 8, 2024

I would like to have this feature. Is there anything blocking the PR?

@mman
Copy link
Collaborator Author

mman commented Nov 11, 2024

@maurerle This PR can not be merged like this as it would break the world. I will implement it in the following days as a command line switch so that it can be override, but can not be accidentally changed via config file. But I'd still love to learn what do you think about #114 and if we just change the delimiter, how would it help. Could you please share your use case?

@maurerle
Copy link
Contributor

Hi @mman that sounds very good! The main drawback of the current solution is, that you need 3 copy pasty queries to show different phases in one graph panel.
This would be solved by #114 - So I'd be very happy with that as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants