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

HealthCheck API endpoint #6009

Closed
MNThomson opened this issue Nov 30, 2021 · 4 comments · Fixed by #6294
Closed

HealthCheck API endpoint #6009

MNThomson opened this issue Nov 30, 2021 · 4 comments · Fixed by #6294
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. Good first issue Good issues to get familiar and start contributing to freqtrade RPC Telegram, ReST API, external control, ...

Comments

@MNThomson
Copy link

MNThomson commented Nov 30, 2021

Describe the enhancement

In the docs, I'm not seeing any /api/v1/healthcheck endpoint or whatnot (heartbeat specific, not referencing ping). Potentially returning the time of last heartbeat and any errors (if present).

This would be highly useful for monitoring and ensuring nothing crazy is going wrong. This would make monitoring from another server much easier and with some simple scripts, could alert the user immediately if either the server or the bot is down.

@xmatthias xmatthias added the RPC Telegram, ReST API, external control, ... label Nov 30, 2021
@xmatthias
Copy link
Member

It's unclear what you'd expect about "crazy going wrong".
if something is "crazy going wrong" - the bot will stop working, which means ping will stop responding.
obviously it could check for the database connection - but that's about it.

Other errors (like exchange errors, api key errors, whatever else ...) are pretty difficult to reliably detect, as they can come in quite many different forms, and (if known) are also handled appropriately to avoid crashing the bot - so they won't bubble up to an overarching exception handler.

@MNThomson
Copy link
Author

Fair point. Would be nice for peace of mind to get the last heartbeat time.

@xmatthias xmatthias added Enhancement Enhancements to the bot. Get lower priority than bugs by default. Good first issue Good issues to get familiar and start contributing to freqtrade labels Dec 1, 2021
@eeddaann
Copy link

@xmatthias, what do you think about creating Prometheus exporter which will expose vital metrics?
I'm not sure if I should instrument the source code or should I decouple it and develop the exporter as a different project which will query the api.
what do you think?

@xmatthias
Copy link
Member

I've got no idea what a "prometheus exporter" would imply - which makes it quite difficult to make an informed decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. Good first issue Good issues to get familiar and start contributing to freqtrade RPC Telegram, ReST API, external control, ...
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants