sfudeus / isg_exporter

Prometheus exporter for data from Stiebel Eltron Internet Service Gateway
Apache License 2.0
6 stars 1 forks source link

Mode: scraping - duplicated data description at one page leads into missing one of the data values #66

Closed svenoone closed 5 months ago

svenoone commented 1 year ago

I have noticed that in the "Heat Quantity" group and in the "Power Consumption" group on page ?s=1,1, the descriptions of the values are the same. I suspect that existing data with the same description are overwritten with a newer data value, as I can only read the latest values.

image

ISG v12.2.1 + WPE-I 12H 230 Premium

svenoone commented 1 year ago

I made a fix for this issue and created a pull request https://github.com/sfudeus/isg_exporter/pull/68

sfudeus commented 6 months ago

Hey, thanks for reporting - sorry for the long delay, but it was just a little below a full year ;-). And thanks for the fix as well. The only reason I am hesitant to use/adapt that is that it will change the metrics names for all users. With my LWZ, StiebelEltron was smart enough to have all the names unique, so I hadn't had the problem. Maybe a "legacy mode" could be introduced to support both metric naming modes. I'll see if I can get into this.

svenoone commented 5 months ago

I can understand that :) It's primarily my problem, not yours. I get on quite well with my fix. Since I didn't have any old data, I didn't have to rewrite the DB. That would be an alternative solution. If anyone work with Grafana, you have to map the new variables anyway, if you don't throw out the old ones, the data will remain in the same diagram.

I think it makes sense not to activate legacy via parameters. If there are people who use your repository and update automatically (without checking release notes), then they will have new names all at once. This is an unfavorable situation. I think it is better to be able to activate this fix optionally.

sfudeus commented 5 months ago

Were you able to test this one already? This would be branch support_non-unique-metric-names or docker image docker.io/sfudeus/isg_exporter:preview-93. Only fixing the prefixing, not the on/off from the other issue.

I'm not 100% happy to go on "Legacy" by default, but as you say, breaking metrics for those who do (auto-) update without the release notes is suboptimal as well. Eventually, I'd switch the default.

sfudeus commented 5 months ago

docker.io/sfudeus/isg_exporter:preview-93 and the branch are now including the onoff fix, rebased from main.

svenoone commented 5 months ago

Tested today, the parameter --metricsWithSectionPrefix. I can confirm the result works as expected. I have that not tested in different languages, just in German.