checking bot is alive via POST command #209
Replies: 1 comment 2 replies
-
Hello, So you mean that the Bot process is fine and running, but the Bot is not responding through Telegram? Then your point is to have some mechanism/interface to check if the Bot has some issue that doesn't allow to communicate through Telegram (i.e. Telegram Server is not available, or it is limiting communication due flood on a specific chat group, etc.)... If so, I think creating an HTTP API-Rest Server to just offer this "health" check is somekind of over-engineering, it adds a full new component and interface to the project that then need to be maintaned and considered. Only way were the implementation of that API-Rest make sense is when we want to really add that interface for further implementation and other usages, like request statistics, export some logs and extra maintenance tools, and this means a lot of work and implementations to support all these different things. But I really don't see any need for all of this... What is your specific use case? Regards :) |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have an issue where the bot is running, but it is not responding.
So, if I use the command line tools to check the PID, it will return it correctly, but it does not mean the bot is responsive.
I'm thinking along the line of POST-ing to the bot with endpoint /health or /status, eg. http://1.2.3.4:8080/health with PING, and the bot will return with PONG, much like how Redis doing its health check. Reference: https://www.inovex.de/de/blog/redis-cli/
With that endpoint available, I can configure UptimeRobot to post the PING command and expect the PONG in return, and it will surely be able to monitor any downtime from that interaction.
Comments appreciated.
Beta Was this translation helpful? Give feedback.
All reactions