-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
InverterLimit is missing in Prometheus Metrics #1617
Comments
I don't know anything about prometheus. How should the output look like? I need to know the exact text. And keep in mind we have the two values |
ah okay. yes here i can help i guess ;) first there is a best practice guide for naming: https://prometheus.io/docs/practices/naming/ then all names should be lower-cased and should have the unit in the name so i would suggest the following according to the current naming:
and these metrics should have the label "persistent" with value "true" and "false" so an example would be
maybe also "powerlimit" instead of only limit would be good as well further it maybe would make sense to add the "inverter" component to the metric names in general so distinguish between opendtu itself metrics and metrics related to the inverter so maybe like this
it also looks like ahoydtu has implemented the same feature a few days ago here: |
Unfortuatly I cannot distinct between persistent and non-persistent limits when reading the data from the inverter. The current output looks like this:
I am wondering if the percentage value should be shown as 0-100 or 0-1 ? |
@tbnobody I am struggling with the naming of topics / variables too, but on a more general level, ie. JSON / MQTT ;) Keeping what @eloo mentioned in mind I would name the two topics / metrics:
This does away with the Regarding the setting of a new powerlimit, please note that AhoyDTU deprecated setting the I would vouch for doing away with the rather awkward reverse-polish naming convention
AhoyDTU accepts both powerlimits on the same MQTT topic, whereby the default is percent Tasmota has a similar feature where it assumes 0-100 is always percent I don't think either is a very good practice / hack and therefor would prefer the two topics above. |
Metric and label naming - Base units
The reason being that many users of dashboards would like to use these extensions for both OpenDTU and AhoyDTU in general. As most of the current MQTT topics are sent as single topics / values we would target the consolidation of the MQTT topics for the switch from these one metric = 1 topic to a newer JSON based topic structure / tree layout. I do not know if you would implement such a change too, but we also keep thinking about documenting / defining the Frequency of these topics and the Retained / LWT flags for those topics where it shall apply. Edit: here #1608 (comment) we also discussed the introduction of a meta PV-pool to group several inverters and specify a common powerlimit for a group of inverters only. |
Thank you, didn't see it in the first place! Just a small offtopic related MQTT. I will NOT implement JSON output. Thats just not how MQTT was designed. One value per topic. There also exists this discussion (#317) for several month. Just had no time/desire to implement it. |
Another question regarding this prometheus stuff. currently all the "names" have the "opendtu_" prefix. is this required to identify the data point correctly? Or is it clear anyways as the endpoint itself identifies the device as opendtu and the prefix can be removed? |
TL;DR: please keep the prefix as it makes it easier to find related metrics of this project imho the prefix is pretty important because you can have tons of metrics in clusters and thus is otherwise hard to find "related" metrics.. e.g. the dtu metrics itself and the inverter metrics.. if they do not share a common prefix you will have hard times to find all metrics related to this project also this is covered by the best practices as well ;)
and others projects follow this as well as you can see in this screenshot (thats just a very short list of metrics in my homelab cluster)
in general yes you can use the endpoint, job or some other label as well.. but its often easier to start with the metric name.. also grafana provides a autocompletion for the metrics name
i guess "renaming" old datapoints would maybe doable somehow but not out of the box or not very easy as the data is "already written" but the impact would be not sooo hard because you can combine different metrics in a single graph in grafana easily.. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
What happened?
Im using prometheus to scrape the inverter data and visualize it using Grafana and thus i have discovered that there is not metric for the inverter limit in the Prometheus metrics.
Especially when you want to set up a zero feed-in the limit value is good to know.
As there are already a lot of data i guess the limit was just "missed"?
Also the limit is preset in MQTT data.
To Reproduce Bug
Expected Behavior
When i fetch the prometheus metrics from OpenDTU i would expect the same data i see in mqtt (limit is available in mqtt)
Install Method
Pre-Compiled binary from GitHub
What git-hash/version of OpenDTU?
v23.12.24
Relevant log/trace output
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: