-
Notifications
You must be signed in to change notification settings - Fork 21
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
does not reconnect to mqtt on connection closed #5
Comments
Thanks for you report! I'll look into it. |
Alternatively there seems to be a more popular option for mqtt here: https://github.com/hikhvar/mqtt2prometheus |
I looked at |
Ok, I will look into your issue. |
I could not reproduce but I have refreshed the exporter with an update of the libraries + mqtt logging. Can you have a look? |
FYI there is a v0.0.1 release with binaries and docker images. |
I think I also faced this issue where the container was still running, but no new messages were being consumed. Here are the last logs:
Not much interesting information here. :) I was using the latest mqttgateway image. |
Just got the same issue, but this time with debug logging turned on. Seems like the reconnection is successful but the subscriptions are not recreated after reconnection? Here are the logs (note that latest log is at the top):
|
Thanks for these logs! I will investigate. |
First off, I like your work. I am using it to integrate node-red flows with prometheus.
I noticed metrics in prometheus go stale when the mqtt server gets restarted. Even with
--log.level=debug
enabled, mqttgateway does not seem to notice its mqtt connection got closed so it does not reconnect and its cache of metrics do not get updated anymore, while prometheus keeps scraping. My golang skills are pretty dusty/absent, so I hope someone can look into this? Thanks.The text was updated successfully, but these errors were encountered: