Remote Monitoring

Remote Monitoring

when running home servers, very early on you may find that things go wrong for unknown reasons. the way you find out something went wrong is when you try to access your server/service. thats the worst time to find out this information because thats exactly when you need to use your it! we need a way to know when things happen before they go wrong.

Uptime-Kuma

uptime-kuma is a service which monitors just about anything you want it to. the most common use for it is a http(s) monitor. when you add a monitor to uptime-kuma, it sends a ping to an http address you configure. if it returns a 200 code (the “everything is ok code”) it registers as “up”. you monitor anything you want, even things you don’t own, like google. everything that has an http endpoint in your server should have a monitor.

because this usually resides on your server, if your server goes down, this won’t work since it will go down with the server. it is best to run this container from somewhere else.

when something doesn’t work, uptime-kuma will monitor it and continue to send pings until a service comes back up. however, what we need is a way for uptime-kuma to tell us via an alert that something is down. enter webhooks.

Webhooks

webhooks are amazing. basically, a webhook allows one service to talk to another through a url. this matters for us because most apps have no way of talking to us unless we are looking at them. we all have lives and don’t want to spend all day looking at dashboards. many services allow the use of webhook notifications. the two most popular are slack and discord. I will focus on discord because I think its far easier to use for our purposes.

discord does not have to be installed on your server. in fact, its best to install it on a desktop or laptop for setup purposes. once you have an account (free), click the + button in the left pane to add a server. click “create my own” and then go to your new discord server’s setting (click the cog icon).

this is the discord page for webhooks (cut off for my privacy). all we need to do is click the “create webhook” button and discord generates a url for us. we then use that url to add it to a service that allows for a discord webhook. for uptime-kuma, we want to go to our Settings > Notifications > Setup Notification to paste our discord url into.

click “test” and make sure you see the alert in you discord (probably the #general channel). youre done! you can use that same url for anything that has a discord notification integration, which is most things. for now, if your setup notification looks like the example above, any monitor you setup in uptime-kuma will notify you if something goes down. i suggest you to use webhooks to have your individual services push notifications to you when things happen besides catastrophic failure. have fun!