text
stringlengths
9
408
[343.66 --> 346.42] oh, yes, the last time it ran was 2019.
[346.84 --> 347.20] Oh, dear.
[347.66 --> 347.78] Right.
[348.06 --> 351.28] Well, and you recall that did happen to me where I had a Google account outage.
[351.28 --> 354.68] And so the backup hadn't run for a little bit and I didn't realize it.
[355.04 --> 355.16] Absolutely.
[355.84 --> 361.18] And so I finally got round to setting up the self-hosted version of the health checks.
[361.38 --> 371.08] Now, I'm running this on Linode because I actually foresaw a situation where all the servers in my house are off for, you know, a couple of weeks.
[371.16 --> 376.42] Let's say I'm taking a vacation or something or traveling to England to see grandparents or whatever.
[376.92 --> 379.46] Or maybe your power is turned off because you're getting solar installed.
[379.46 --> 381.60] Yes, that is happening soon, actually.
[382.38 --> 387.36] And so I thought, right, where can I run this that is reliable and is going to be more reliable than my house?
[387.40 --> 389.36] And I thought Linode was a perfect fit for that.
[389.56 --> 393.66] So this is running on one of their $5 a month Linodes.
[394.00 --> 399.68] It's the same one that's doing perfectmediaserver.com and my personal blog and all the rest of it.
[399.72 --> 403.96] So this box is serving like quintuple duty at this point.
[404.08 --> 405.46] It's doing a lot of stuff for me.
[405.52 --> 406.26] And it's only a five.
[406.26 --> 407.50] It's only a five or a month.
[407.82 --> 409.16] I love it.
[409.16 --> 416.22] The self-hosted version of HealthChecks, I'm running the Linux server docker, which was written by one of my friends, also called Alex.
[417.28 --> 423.26] He has done a bunch of work with making sure that it pulls in the latest code from the HealthChecks repo.
[423.26 --> 430.46] So there is, as always with containers, it seems, a choice to be made about which container do I run.
[430.54 --> 435.32] Do I run the official one or do I run the Linux server one or some other random one?
[436.00 --> 440.32] I try and run the Linux server ones for obvious reasons whenever I can.
[440.68 --> 445.28] If for no other reason, then they auto-update, which is kind of nice when you restart the app.
[445.28 --> 451.70] So you get all the features with this self-hosted version that you don't get on the hosted version.
[451.84 --> 459.38] So actually, in this case, self-hosting gives you more functionality than the hosted version, which is always nice.
[459.74 --> 461.26] And there are a bunch of integrations.
[461.26 --> 468.82] I'm just using one with Pushover, which is a push notification service, which you configure through environment variables for the container.
[469.00 --> 476.90] You generate a token with Pushover and pass that through an environment variable in your Docker Compose file or however you like to do that.
[476.90 --> 482.74] It also supports a bunch of other interesting stuff like Prometheus, Ops Genie.
[482.90 --> 485.24] If you're doing something for work, this can be useful.
[485.82 --> 489.86] You can have it ping Slack, Discord, Microsoft Teams, Mattermost.
[489.98 --> 491.06] It does webhooks.
[491.56 --> 494.24] There really are a lot of integrations for alerting.
[494.50 --> 495.96] I'm just using Pushover, as I said.
[496.36 --> 500.72] It's really nice because I don't really see it if it's in the log file.
[500.72 --> 509.44] But if I got a message in the same communications tool I'm using to chat with you and Wes or something like that, then I'm definitely going to see it.
[509.50 --> 510.94] And then I'm going to be able to take action on it.
[511.24 --> 516.56] And so just those small things like being able to send a message to Slack, it makes a huge difference for me, Alex.
[516.80 --> 517.94] It supports Telegram as well.
[518.04 --> 519.62] So if you have a group of people.
[519.74 --> 520.76] Yeah, there you go.
[520.90 --> 525.52] You can actually have it interact with bots as well, I think, and do a bunch of stuff with that.
[525.52 --> 533.88] So you could make this really quite deeply integrated into some kind of an incident response solution type thing.
[534.36 --> 535.54] I don't really need that.
[535.62 --> 538.96] I just need to be reminded that, hey, dummy, you haven't run your backups for two weeks.
[540.40 --> 545.86] Did I track that in that description of yours, you transitioned from the hosted solution to the self-hosted version?
[546.28 --> 546.46] Yeah.
[546.76 --> 547.50] And why was that?
[547.62 --> 551.26] Well, number one, I was running up against the 20 job limit, which I thought was 10.
[551.26 --> 555.42] So maybe I wasn't running up against it, but I knew I was going to be running into that limit soon anyway.
[555.84 --> 555.90] Okay.
[556.20 --> 563.50] And I also, you know, as part of being the host of this show, feel a responsibility to try these things out on occasion.
[564.12 --> 565.04] That's how I felt.
[565.18 --> 573.98] Not just because of that, but I thought because I could host it, say, on a VPS, and then I could check even the systems here on the LAN at the studio, it might be worth doing.
[574.66 --> 576.30] What kind of setup am I looking at, though?
[576.48 --> 579.80] Because things I'd like to monitor is like, is NextCloud running?
[579.80 --> 580.80] So what does that mean?
[580.82 --> 582.78] It means, is the web port available?
[583.06 --> 584.64] Is the database server online?
[584.64 --> 586.56] I guess is the web page loading?
[587.00 --> 588.54] I'd like to know that kind of stuff.
[589.02 --> 590.34] But there's all kinds of other things.
[590.40 --> 592.94] Like, I'd like to know, we have our Matrix server that we run.
[593.46 --> 596.40] That isn't on the LAN, but it's a server we manage.
[596.40 --> 600.36] And Matrix eats a crap ton of RAM right now.
[600.36 --> 603.50] The Synapse server is definitely a work in progress.
[604.10 --> 609.88] And it's something that we have to log in and manage from time to time and even restart sometimes or go through some sort of cleanup.
[609.88 --> 615.92] And I'm wondering, like, what about those kind of scenarios where the system's running out of memory?
[615.92 --> 619.50] Does it do that kind of monitoring, that kind of reporting?
[619.62 --> 623.22] Or is it more failed, yes, or working, that kind of stuff?
[623.22 --> 629.42] It's a great question because it's a bit of a confusing area, all this monitoring and alerting type stuff.
[629.92 --> 636.60] So HealthChecks is primarily designed to be run as part of a script or a cron job or something like that.
[636.60 --> 641.08] And the way it works is you curl a URL, you hit a URL.
[641.80 --> 646.44] The HealthChecks API on the other end receives that request and goes,
[646.60 --> 651.30] hey, I've just been pinged on this random string of URL, UUID type stuff.
[651.60 --> 653.26] That's a phoning home.
[653.46 --> 654.86] That is that job completing.
[655.08 --> 665.10] So if you put it at the end of a backup script, say, the very last line is curl HTTPSHealthChecks.com slash your UID,
[665.10 --> 672.32] then the software knows that you've successfully got to the end of that script and it assumes everything's gone well.
[672.64 --> 676.12] What you're looking for, I suspect, is something more along the lines of Prometheus,
[676.24 --> 683.38] which is designed to monitor disk space and memory usage and CPU temperatures and percentage and all that kind of crap.
[684.12 --> 688.12] And Prometheus will then output to something called Alert Manager.
[688.76 --> 692.48] And you can write what's called PromQL, Prometheus Query Language.
[692.48 --> 695.04] Queries sounds complicated.
[695.18 --> 697.26] It's much easier than SQL to get started with.
[697.36 --> 702.24] So if you've ever had to write an SQL query, you can probably write a PromQL one.
[703.06 --> 706.36] And that's probably more what you're after in terms of monitoring.
[706.56 --> 710.04] You know, is Matrix, is the API still available, for example?
[710.32 --> 713.00] Can I still hit a certain URL?
[713.20 --> 714.50] Is that website still available?
[714.50 --> 718.26] In the meantime, I've been keeping an eye on it with net data, which feels like a cheat.
[718.50 --> 721.38] I feel like I almost am ashamed to admit it, but it's been handy.
[721.62 --> 724.16] And I've used that to kind of keep an eye on the system.
[724.22 --> 725.78] But I know I need to take it to the next step.
[725.84 --> 727.86] Maybe a topic for a future episode.
[728.28 --> 729.64] Who doesn't love a pretty graph, eh?
[729.64 --> 734.84] Speaking of which, did you know about this command I found out quite recently about this one?