Uptime kuma details.

This commit is contained in:
pablo 2022-01-23 20:12:36 +01:00
parent 067a64dc5b
commit df2f29a2be

View file

@ -291,6 +291,43 @@ useful: [the gist](https://gist.github.com/ziggie1984/48a67f3ee3cd0616e40620dc3
Eventually, I need to set this up. But I will still play around manually for a
while to get a feel on the behaviour of flows with different fees.
## Setting up uptime kuma
As part of my efforts to be professional and keep the node with the best
possible uptime, I should always know if the node is up. Since checking
constantly myself is really something I don't want to do, I decided to use
uptime kuma to do the job for me.
To get this done, I installed uptime kuma with docker in navaja. Since it won't
hold any critical data, I'm not really concerned about backing it up or
anything like that.
Once that was ready, I played a bit with the different pinging options. Things
were difficult, because with banky behind an onion address, regular HTTP and
TCP options didn't work. I am not sure if that was because it's plain
impossible to set that up, or simply I was doing it wrong because I'm an
ignorant. In any case, I discovered that uptime kuma has a cool option in which
you reverse roles: uptime kuma is constantly waiting to _receive_ a heartbeat
from the monitored service at a certain schedule. If it doesn't, it considers
the service to be done. I went for that option, and I simply had to set a curl
call in banky with cron to run every minute. Easy peasy.
Next was to prepare some alerts in case banky goes down, because otherwise I
would be stuck having to check uptime kuma constantly, so I would still be at
the starting point.
The easiest option I could find was to use a telegram bot. To get this done, I
set a telegram bot by sending a message
to [the Bot Father](https://t.me/BotFather) to create a new bot, which I called
uptima_kuma_bot. Lovely typo there, but doesn't matter. The auth token for the
bot is 5184325884:AAHGsULQXWNVy-BHaP8d-itKOK-FwEHQSuI. Then, I set up a group
between me and the bot, and got the chat id by
accessing [this endpoint](https://api.telegram.org/bot5184325884:AAHGsULQXWNVy-BHaP8d-itKOK-FwEHQSuI/getUpdates)
. With that, I managed to configure uptime kuma to send a message everytime
banky goes down or recovers. The whole thing is suboptimal because,
technically, umbrel services could go down while banky stays up, and the uptime
kuma won't notify me. But as the meme used to say, it's something.
## My sunday checklist
Keeping an eye on the node is important, but I haven't put much structure into