Skip to content
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

Stopping export of metrics after some time of work #33

Open
romaadereyko opened this issue Dec 2, 2024 · 8 comments
Open

Stopping export of metrics after some time of work #33

romaadereyko opened this issue Dec 2, 2024 · 8 comments
Labels
needs more info More information is required

Comments

@romaadereyko
Copy link

romaadereyko commented Dec 2, 2024

Container is working, but prometheus don't see metrics after 1 week of working. Logs are stopping at this moment. this problem repeat on 7 different machines with different parameters

@jvstein jvstein added the needs more info More information is required label Dec 2, 2024
@jvstein
Copy link
Owner

jvstein commented Dec 2, 2024

@romaadereyko I need more information to help.

Are you able to view the metrics page in your browser or via curl? This will depend on how you are running the exporter, but typically something like curl http://localhost:9332/metrics/ should return the values.

If that works, but Prometheus can't return the metrics, then it's likely that Prometheus isn't scraping the exporter. The exporter does all of it's work at request time, so you won't see anything in the logs until a request is made.

@romaadereyko
Copy link
Author

romaadereyko commented Dec 3, 2024 via email

@jvstein
Copy link
Owner

jvstein commented Dec 3, 2024

@romaadereyko Oh, so the metrics are collected successfully for a week and then they stop?

@romaadereyko
Copy link
Author

romaadereyko commented Dec 3, 2024 via email

@jvstein
Copy link
Owner

jvstein commented Dec 3, 2024

Does the exporter still respond with updated values via curl when they stop in Prometheus? Does the exporter return an error? How long does the request take?

If the exporter still responds, I would start looking at:

  • The logs of your prometheus installation, maybe with --log.level=debug.
  • The prometheus up and scrape_duration_seconds metrics from the prometheus server itself. A up == 0 would indicate problems contacting the exporter and a high scrape_duration_seconds might indicate a timeout when collecting metrics.

@romaadereyko
Copy link
Author

No, exporter respond with not updated metrics
I'll setup debug level & I'll see metrics when container wouldn't respond with updated metrics

@romaadereyko
Copy link
Author

Exporter respond with not updated metrics. After restart exporter responds with updated metrics
Exception.json

@jvstein
Copy link
Owner

jvstein commented Dec 10, 2024

The Connection reset by peer means something is interrupting the connection during the request.

Do you have a reverse proxy in front of the exporter? Is there a configurable timeout on it? The timestamps look close, but I don't know about how that's all logged.

I would recommend trying a different version of Python to see if it's reproducible. Either way, this seems like a defect in the runtime environment or the wsgiref web server and not something I can address here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info More information is required
Projects
None yet
Development

No branches or pull requests

2 participants