-
Notifications
You must be signed in to change notification settings - Fork 15
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 MPPT metrics #42
Conversation
cd54c79
to
435e037
Compare
Hi! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work so far! 🎉
I think it could be even more improved for both user and maintainers though.
943eed8
to
3e38203
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 things that came to mind: Right now the timeout
option is applied to both requests. Meaning a timeout of 5 seconds could potentially end up in a scrape of 10 seconds. If we have further Data to scrape, 15 seconds etc. It should be at least documented what this means.
However, thinking even further, it's probably a good idea to make the requests in parallel. That should end up in faster scraping. A little more care needs to be given regarding error handling, in order to present only 1 error to the user, I'd propose to add https://github.com/hashicorp/go-multierror into the mix: Each fatal scrape error can be combined into one and it nicely displays multiple occurred errors.
I would be fine with doing this in a second step in a separate PR. If you would be interested in doing this, I would also delay a release until we have parallelization.
Agree, but additional PR would be my choice |
5463458
to
7cda011
Compare
7cda011
to
d06dfb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work!
Do you know if you are going to work on the parallelization right away or would you like a prerelease first?
I'm leaving in vacation for 1,5 months so I would not be able to work on this for that time. After that no problem. |
Ah ok. I'll wait for a release and try to come up with something, shouldn't be too hard. |
Na klar. Habe ich gerne gemacht. Wie gesagt, bin absoluter Go-Anfänger ;) |
Summary
--symo.timeout
--symo.timeout
. Please take that into consideration when configuring Prometheus scrape interval--symo.enable-power-flow
,--symo.enable-archive
with default values beingtrue
. With these flags, you can also disable each API endpoint.Breaking Changes
--symo.url
flag suggested to use the full URL path like--symo.url http://symo.ip.or.hostname/solar_api/v1/GetPowerFlowRealtimeData.fcgi
previously. This has now changed to base host name only, e.g.--symo.url http://symo.ip.or.hostname
(without trailing slash)Checklist
fix
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog