Open ilbuonmarcio opened 3 years ago
Indeed if it's something well accepted upstream I'll try and do the implementation myself 👍
Ah yap, good point. I will add in later.
Actually, can you give me more idea what kind of information to be included rather than just ok?
I would say, following information is to be cached by trailing trade indicator job and show with /status
I'm thinking also about uptime too, but the ones suggested are also good indeed :)
Just to be sure, anything fast to check possibly, so we can call it frequently without making any degradation of the bot's service.
I'd see also something with not private data like how much the bot is holding as such, or if you want that, make two separate endpoints, one with /status
and the other with maybe /status/<TOKEN_STATUS_PRIVATE_DATA>
(added via .env
file) for private data, so we can catch both cases and handle both of them properly.
Just implemented the basic endpoint, for the more "private" endpoint (with mandatory token access in the endpoint itself) I'll let you decide on how to implement it, I'm still learning the tech stack and don't wanna mess it up more than I can add :P
Is your proposal related to a problem?
I'm trying to monitor my bot using Grafana, but using the bot main page as the checking endpoint puts unnecessary load on the bot itself.
Describe the solution you'd like
Can we make something like a /status endpoint, maybe just a JSON with status OK and an HTTP 200 response code, which we will call with monitoring services?
That can be a nice touch :)
Additional context
That can be useful when you are hosting in an untrusted cloud provider, or checking if your selfhosted at home bot is currently online or not.