-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Prometheus metrics parse error on tasmota_sensors_totalstarttime #10221
Comments
A secondary problem. I patched to code to avoid emitting the problem line (Prometheus now successfully pulls data from the device), but am occasionally seeing exceptions:
If I can figure out how to translate these addresses into code references, I'll try to dig up the context of the failure. One of my modules appeared to reboot approximately 160 times over the last day. It caused the power to cycle to the connected outlet each time. |
Disable Prometheus to see if the issue is in there. If so it is likely caused by a string dedicated to "%d" or a number dedicated to "%s". Happy hunting. |
I'm trying it now with Prometheus turned off. The crash didn't happen on the first prometheus scrape -- I received valid data several times. Assuming the problem does go away with prometheus disabled, I'll try to perform some manual scrapes with |
I think it is a memory issue. It fails repeatedly every 60 scrapes or so, and I can watch the "Free Memory" on the status page tick down from 27K to around 5K at which point it becomes nonresponsive. I'd guess it's losing around 300 bytes per scrape. I'm new to the code, so maybe I'm missing something obvious, but in
|
Added a few Diff to fix both issues is here:
|
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
Prometheus reports "strconv.ParseFloat: parsing "2020-12-22T04:58:04": invalid syntax". It appears this value is returned by the tasmota_sensors_totalstarttime metric.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
Steps to reproduce the behavior:
Compiled in prometheus module, used with prometheus 2.22.1
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen.
Metrics should be processed without error.
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: