GET NOTIFIED of an outage in your home lab or anywhere with Uptime Kuma and Home Assistant.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
there are many options out there today to monitor both remote and local infrastructure some of them are more complicated than others for example you've probably seen check mark in some of my videos and i've even had comments asking about it checkmark is an enterprise great solution and it requires some enterprise great configuration which makes it pretty complicated to set up it does have options for you to be able to do specific things with it however for most monitoring if you're just monitoring some local stuff there is an alternative to that it's called uptime kuma it's based on the uptime robot which is something you've also probably seen in my videos and today what i'm going to do is take you through setting up uptime kuma as a home assistant add-on setting up some notifications and monitoring and just see what we can do with it so let's get started [Music] so as i said this is an add-on to home assistant and we'll go over to my test device my home assistant raspberry pi 4 and we're going to go to the add-on section so i'm going to do the shortcut for that click or hit c on the keyboard and hit the add-ons dashboard and because this is a an add-on that's an official add-on you can get it to it directly from the add-on store so clicking that blue button there and then searching for kuma is the easiest way and you can see here it's a home assistant community add-on called uptime kuma self-monitoring tool like uptime robot itself hosted which makes it very nice and it's very simple you just install it as a normal add-on would be installed once it's installed you can look at the documentation and there's really nothing here to talk about you can look at the configuration and the only configuration option you have is to change the port that it's on if you have something else running on port 3001 on your home assistant instance you'll need to change this port because it'll make a remote connection to it as always you can look at the logs and see if there's anything of note in the logs and currently i see nothing in the logs because we've not started it yet so let's go back over here and click on start give it a second to start up and once you have it started up you will see an uh web ui option and you can click on that to open the web ui when you first load it up it's going to ask you to create an admin account so we're going to call it me and give it a password and we'll just create that account and this is your first admin account the interface is super uh super easy to use uh right now we have no monitors so we have nothing up or down nothing in unknown or pause state before we add a monitor let's go over to the settings and take a look at that so under the settings page you have a bunch of different options here under generally have the time zone uh you have allow indexing or discourage indexing it's a locally hosted uh monitoring service hopefully inside your network so it doesn't really matter here but i would discourage it anyway your entry page is the dashboard and your primary base url you can set by clicking the auto get this is the i p address or domain or whatever you're coming from and the port that i'll go to and if you're using this to monitor stream gaming servers you will need a stream api key i'm not going to demonstrate that today but it is interesting that it supports that over here under appearance you can choose your theme light darker auto you can choose a theme for the heartbeat bar or the theme where the heartbeat bar goes and when you have monitors over here you'll see that heartbeat bar notifications are available you can set up notifications from here or you can set it up once you add your first monitor we'll come back to that in a minute reverse proxy uh this is not currently supported and under the documentation you'll see that talked about there's a monitor history that you can set the number of days for 180 days right now is the default you can also shrink the database using the vacuum option for sql light if your database is created after 110 auto vacuum is already enabled and this action is not needed so any version greater than 1.10 of the home assistant kuma is already doing this for you and then of course you can clear all statistics if you want to do that under security you can create a two-factor authentication settings or you can disable authorization entirely and then proxies we're not gonna do anything with proxies today you can backup all of your data through an export and then just a little bit of information about what this version is 1.17 and then you will have the option of showing the update if it's available and also checking for beta releases okay with all of that out of the way and the settings the way we want them let's go ahead and add our first monitor and you have a whole bunch of different monitor types this is really neat you have https or http tc port ping you can do http with a keyword you can do dns monitoring you can do passive monitoring using push stream steam game server mqtt and sql server those are your options we're going to start with an http monitor and this is going to be my home assistant blue my primary instance of home assistant i want to monitor that and even though i'm using nginx reverse proxy to monitor my home assistant instance what i want to do here is i want to specify the ip address because if the reverse proxy goes down nothing's going to work and so i want to make sure that i'm going directly to the source of my home assistant here we can set a heartbeat interval how often it checks which is defaulted to 60 seconds retries i'm going to set this more than one sometimes you have a network blip and you don't want to be notified immediately this will retry every uh 60 seconds three times before it sends an alert and then of course the heartbeat retry interval as well so checks every 60 seconds if you want it to check three times every 60 seconds you leave this at 60. if you want the retrieves to be a little bit longer or a little bit shorter then you can set this for that as well and because i'm using using a an ip address rather than the fully qualified domain name i need to go ahead and ignore tls ssl certificates for the https otherwise it's going to error out on me you can also do a certificate expiry notification so if you're monitoring a site that has a certificate on it in the notifications it will tell you that the certificate is going to expire on certain days ahead of time and that's set in the notification parameters you can also do an upside down mode so if the status is upside down the service is reachable it will alert rather than being unreachable and then if there's redirects involved to get from the point a to the url the final url it'll allow up to so many redirects defaults to 10. your accepted status codes 200 through 299 are typically the ok status codes and then you can tag it if you want to and i'm going to go ahead and save this right now so now we've added one monitor successfully and now you can see here that we have first of all a pending and what this means is it's not uh it's not checking it properly typically when you first install something it's going to do a first check and it's going to be green here so let's just edit this and see what happened here we need to put the port 8123 so let's put the port you can specify the port here and that will solve that problem and now you can see that saves behind me there and that is now green otherwise we would have gotten alert in just a minute now you do notice that we have no notifications for this monitor so the first thing i want to do now or the next thing i want to do is set up a notification and this is really cool of this setup it has a up to 90 plus notifications for all these different types of services i'm going to start with push over because i use that a lot for stuff and i'll just give it a name push over alerts or push over alert now for pushover you need a user key and you need an application token and you set those up on the pushover site if you're already using pushover for some other alerts then you know how to do this so i'm going to go ahead and supply the user key in the application token okay so i've supplied the user key application token and you can specify a device that you want the notifications to go to otherwise if you want to go to all devices you can leave that blank give it a message title i'll just give it a kuma alert for title you can set your priority on your device uh negative two all the way to positive two and then it says here emergency priority two has default 30 second timeout between retries and will expire after one hour and then for sound we can just pick whatever sound we want to choose for that now you can also set it to be the default notification for all uh devices or monitors you add and then you can apply it to all existing monitors and you can also send a test and it should go out immediately which there's the test i just sent to my device and we'll click on save so now we have one notification for our h a blue now you can add additional notifications to this as well if i want to go and add a discord notification i can do that as well and then you have to have a web url or web hook url from your discord server if you're running a discord server and you just throw in your web hook url from from discord and then you can give it a up or a bot display name this is actually a bot on your discord server so i'll just leave it as uptime kuma you can do a custom prefix message if you want to and then you can again apply to all monitors so i do have that ready to go and we'll save it and now you can see that i have multiple notifications for a single monitor i don't know what the limit is on notifications here i guess you could send it to a bunch of different places but between pushover and discord that's going to be enough for me okay so let's add another monitor just for the fun of it so we'll click add new monitor and this one we're going to do a ping monitor and i'm going to call this camera one and the host name will be an ip address 60 seconds retries three and then everything else is the same we'll give it a discord and a pushover and remember since we set this as the default the pushover alerts will automatically be added to all new monitors save that one now we have two monitors and let me do one more just to show you a different type so i'll add one more monitor and this is going to be a dns monitor i run internal dns servers within my network here and i'm going to call this blue dns that's my primary dns my host name the host name is the name you want to look up on the dns server not the host name of the dns server so we can just look up google.com and my resolver server is actually the local address of my dns server so we'll put that on here port would be 53 by default typically that's what your dns servers will run on resource record type you can choose any of these lookup types if you wanted to put a text record in your domain name and look that up in your local one of your local domains then you could do that we'll just leave it as an a record for now a record heartbeat 60 seconds retries i'm gonna leave that one for zero now because we're going to play with that in a second and then upside down you can add tags okay so now we have three different alerts here what else can we do with uptime kuma well you can add a status page and by adding a status page you can then create one of those fancy status pages that you see on some of the websites i'm going to give it just a name random name status or how about vc status that's the name of my area here and we'll give it a slug of bc status and of course you can only put in certain characters because it is your url click on next and now we have a white page and for those of you on a monitor or whatever sorry you've been blinded let's go ahead and switch to dark theme and we have a couple options here create incident uh add groups or add monitors now here's a cool thing you can do about this you can add these monitors separately or you can group them so let's just say i want to add those all separately i will just add each one of these and you just find and click on it and puts it in the list you can add a custom footer if you want to and you can add a description and once you're done you could do some custom css you could do all kinds of stuff to make this page look how you want it to look click on save and now you have basically a status page if you have an incident you could actually come over here and create an incident and you can choose the style let's say danger uh outage the tvs are broken i don't know just make something up right and you just post that save it and now if you go back to your status page if there's a bunch of things here having outages you can put a notice here of what that is but let's take that off now so we can unpin that and save it and now we have no more outages so let me show you something else that's kind of cool about these status pages but first let me go back to the dashboard add a new monitor i'm going to add a second camera here and it'll be ping call it camera 2. the hostname is 172.16.1.20 i believe and we can again do retries three uh and save that one and now we have another camera added so we have two cameras a dns and an h.a blue now we can go back over to our status page and we can edit the status page and we can actually add a group and i can call this group cameras and you can add monitors to the camera you do that here camera two now these only can be a part of one group at a time so i need to remove camera one from this group and add it to this one and then if we save this we now have our services in different groupings so you could create groups based on what type of services what room it is where uh where it's located whatever you want to do and so you can look at a glance different things and whether something's up or down or not one other thing to note about this status page is as best i can tell it does not auto refresh so you have to come over here and periodically refresh it the dashboard does auto refresh i'm going to go ahead and i'm going to shut down actually i'm going to add one more monitor here let's do our one more dns monitor and we'll call this backup dns again the hostname is not the dns server the resolver is the dns server and we're going to leave this a in 60 seconds zero retries so it'll go down immediately so now we have all of those here and by the way when we're talking about settings earlier and we look at the appearance and you want to put the theme heartbeat where you want the heartbeat you can go bottom here or you can take the heartbeat off entirely so it's your choice there and where you want the heartbeat all right so let's go back over to the dashboard one of the things i'm going to do now is i'm going to go ahead and i'm going to break this backup dns so i'm going to go back over to home assistant here i'm going to go to the add-ons page and i'm going to shut down my second dns server by stopping it and now if we look at uptime kuma we should see and this is a history of statuses by the way this is not the current status this is the current status of where everything is so now we look at this and we watch the status over here what we'll see is we'll see and let me get out of the way because i think it'll pop up here yep so i got a connection refused from my dns server my backup dns server so you see now it's back it's uh down and i also you may have heard all of the notifications just came in plus if i go over to which i probably didn't enable it yep i didn't enable it the default got enabled on the backup dns but it did not actually edit or enable uh this discord so any of these that you want to add these two you need to make sure you turn on the non default all right so those are all there now i would have gotten a d alert and discord as well so i can click on this if you go to the status pages they don't get automatically added to the status page either and i did that wrong let me go to status page here it is click it there if i want to add another service such as that one i just added uh we'll go to edit status page and here's one of the things i've found about adding a group i'm not sure why this is but here's the monitor if i click this here it's going to add it to here to this cameras one so what i have to do is move the group around the services before i add it and it will add it to whatever services are at the top you can also move these up and down so if i want camera one above camera two i can do it that way and then i can save the status page and now i have my services and my cameras you can see my backup dns is zero percent uptime and you can also see here the red bars so that's kind of neat about the status page you can have this status page publicly made available if you're running some services that other people want you would just set up a link to the status page for people to view that all right go back to dashboard i'm gonna go ahead and turn back on my home assistant ad guard my backup dns server and in a moment we should see that come back up over here and hopefully you will also see that come up down here as a notification there it is now it's back up all right so one other thing i want to show you real quick is uh when you look at this you also get a nice graph a historical graph of what the service time was so you can see the response time for a ping your average peeing your up time and your are for 24 hours and your 30 day uptime you can also see that on these cameras anything you've got going here you can get a pretty good response time graph as well as how many days it's been up you'll also notice that you have cert expiration here now this is an old domain expired 521 that's 68 days ago had i been going to a domain that was a fully qualified ssl domain rather than the ip address it would have looked at the domain and told me how many days were left in that particular expiration you can also click on this and get all of the relevant information about the domain that displays down here if we want to turn on domain monitoring or certificate expiration notifications we can click that here as well and that will actually send you a notification and whenever the ssl certificate is expiring under settings and under notifications you can choose https monitors trigger notification when tls certificates expire they must be assigned to a monitor to function so you can do seven days 14 days 21 days you can even do one day if you wanted to and it would add it one day so you can get all of these notifications up to the point where the certificate is about to expire and you can take some action on that all right so that is uptime kuma uh one final thing you can do here let's say you're doing some maintenance on something and you want to pause the monitoring you can click that pause and it will pause it until you go in here and resume the monitoring uh so that's again that's uptime kuma it's an add-on and home assistant it works really well um and it's a simple way to monitor your services or even external services if you want to let me know if you have any questions down below in the comments subscribe if you're not a subscriber join the channel support me what i do if you like to do that as well and i really appreciate everyone who watches my videos and helps support all of the stuff that i do here thanks for watching and we'll see on the next one [Music] you
Info
Channel: mostlychris
Views: 23,755
Rating: undefined out of 5
Keywords: Smart Home, Home Assistant, uptime kuma install, uptime kuma setup, uptime kuma homeassistant, website uptime monitoring, service monitoring, network monitoring tools linux, network monitoring, network monitoring tools, uptime, downtime, outage monitoring, outage alerts, monitoring alerts, uptime kuma, alternative to uptime robot, monitor website uptime, uptime alerts, install uptime kuma, monitoring your homelab
Id: BNiWDNfqpc0
Channel Id: undefined
Length: 20min 40sec (1240 seconds)
Published: Sun Jul 31 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.