CheckMK - An Open Source, Self Hosted, Network and System monitoring tool that is easy to setup.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] it's your open source advocate and i'm back with another video and today i want to talk about check mk this is an open source i.t infrastructure monitoring system now there are a lot of these out there there's cacti there's nagios there's just there's a lot of these out there and they all take a certain amount of work and expertise to get set up but when i started looking at this one their documentation is absolutely amazing i found it very very easy for me to get this up and running very quickly on my home lab network which is great that's something i'm always looking for now i've had a lot of people say you know i just want something that just discovers all of my devices and just monitors them magically except that's not really how monitoring works there are certain protocols that you can set up and have things monitored quote unquote automatically like snmp so short network or simple network message protocol i believe is what that's called and you'll get a few things out of that and certain pieces of hardware just have that built in which is great but when you really start talking about monitoring your devices and everything else on your network and getting that information it takes a little bit more effort and a little bit more work and a lot of times you have to install various pieces of software so the thing i like about check mk is that you install the server and it's pretty easy to get the server up and running and once you've done that you go and install the agent on the devices that you want to monitor but this also works across networks so you're not just talking about with your network at your home but this could be something where maybe you have something in aws or in digital ocean or in azure or or somewhere else out in the cloud and you have like a virtual private network that goes between those things so you can actually set it up so that you're not just monitoring one place one business one home lab but you could be monitoring those things that are out there on the cloud as well so it's really kind of a cool setup and i think it's got tons of potential for you guys that are interested in networks and monitoring and and really taking control of your networks as your network grows so i want to show you how to install the server i'm going to show you how to install the client software on a couple of clients today it's very straightforward there's not a lot to it but there's a little bit of setup once you've installed the client as well just to get everything ready and kind of up and running but it's super straightforward i think you guys are going to really like this one so stick with me and we'll get into it right after this i want to say thank you to all of my subscribers and all of my patrons over at patreon seriously you guys make this so worth it for me to do these videos every week i really truly enjoy it and i just can't say thank you enough if you're enjoying these videos subscribe let youtube know that i'm doing a good job by subscribing to the channel plus you'll get notified when i have new videos coming out and finally if you're enjoying what i'm doing give it a like just click on that thumbs up and that way youtube knows that you like it and they'll pass it along to other people that might enjoy my content as well i really appreciate it thank you again let's get started so as we get into this i want to talk a little bit about the options that you have so when they talk about solutions they've got a lot of different things here that you can look at another products page the thing i always like to cover for open source projects is their pricing i know a lot of people think open source just means free and there is a free option as in free it doesn't cost you any money but really when you talk open source free it means freedom the freedom to change the software to modify the software to do whatever you want with the software to redistribute the software those kind of things so for me it's important to talk about the pricing because if we don't support open source it won't continue it will become the business that's trying to do this thing in open source can't continue in an open source way they'll have to stop doing the open source part they may not stop as a business but they'll stop doing the open source part so it says get your check mk subscription you can see here 25 hosts is free and then as you move up you get this 3 000 services up to 100 hosts 65 thousand services up to two hundred hosts two hundred fifty dollars or a hundred twenty five dollars sorry and then as you go up to twelve thousand services and i don't know four hundred hosts you get two hundred dollars so you can see kind of how their pricing works and if you need more than that you can just continue over this way and it's it's dollars per month now i believe that this is part of their their cloud offering where they're running the service for you so be aware of that if it's something where you're like you know what i just want to run another thing that i have to keep up with they have services that you can get and they can have you have things that you can do now if you're this is euro so keep in mind here's some here's us dollars i'm sorry i was saying dollars and i was looking at euros so it's 65 euros you go to us dollars it's 80 us dollars so they're kind of looking at the exchange rate for the for the current time okay so just be aware euros us dollars you can switch that but i think it's important that you say you know what i like this service as a service i want to use and i'm willing to pay for this service so if you're a business if you're an enterprise and you're looking for a service and you say you know what this is about what i need to start off jump in there and start paying them because you know what that's what keeps the open source side open source it's really important for us to pay for open source software and to make sure that they're getting the money that they need now the next thing i want to talk about is their documentation so they have a community which is great you can go out here and check out their community information then they have the learn section so they have a lot of stuff here under the learn like i said their documentation is really good and their documentation over here is really something that i was really impressed with that's why i kind of wanted to cover this with you guys but so in this case we've got installation on debian and ubuntu that's what i'm going to do today now they also have a docker that's what i started with just testing so i'll show you guys kind of how to do the docker as well it's really not complicated it's very straightforward to set up the docker stuff so if you want to run it that way you can but they have a little warning that says docker could be limited just in depending on how many devices and services and hosts you're trying to monitor and that depends on your host operating system and how many other things you're running with docker and stuff like that too so be aware of that um if you want to run this you might want to set up something like an lxc container which is what i've done and what we're going to what we're going to run this on today to kind of see how that works you may want to set up a specific virtual machine server or virtual machine or an actual full-on metal server that you want to run this on it's kind of up to you and depending on what kind of resources you have to run this but there is the option to do that as well so here in the documentation they talk about download the addition that you want when they talk about the editions it's really you know pick the addition that you want and then download the archive it's really important you understand what the additions are so they have the raw edition which is really the open source version the community driven version that's important for you to understand there are these other additions that you can get again if you need more capabilities than what the raw edition offers then you've got that opportunity to get out there and actually get something that's bigger and better and it may cost just a little bit of money which is great again because that supports the company and supports the open source project that they're that they're doing so as we go down we're going to use the raw edition today just for this video and they've got a few things here kind of like set up you know things that you want to have set up so you want to do app install open snh server if you don't already have ssh server installed where you can you where you can ssh to the server you want you're going to want to install that so make sure you get that installed now what we're going to do ubuntu and debian today i also wanted to point out that they have the options for red hat for for centos and then also for susa linux enterprise so you have a few different options here it's not just debit and ubuntu so you do need to run this on a linux system but again if you run it through docker it kind of doesn't matter if you're running on a specifically a linux system as the host but the docker stuff will pull down what you need in order to run this next thing you want to know is how to get the software so if you click here again you'll see this link that says addition so you click on product at the top and then additions and then you'll come here and it'll say hey what do you want to get so in our case today we're going to get check check mk raw check mk enterprise is here and available if you want to check it out they do have some free trials so you can do that as well so you can try it for for free but we're going to get the the check mk raw today you'll come here and i'll say okay what are you wanting linux docker or are you looking for like an appliance that you can install as a virtual machine so they do have those options as well depending on what you're wanting to do is completely up to you we're going to do this one here for linux so we're going to look at this we're going to see okay we want this top version yes we want in my case ubuntu and i am doing on 2004 version so i'm going to grab that 2004 version we're just going to scroll down so you just click on the options you want as you go keep scrolling down and you'll say install check mk downloading check mk for ubuntu or debian and we can just use this wget script which is great because that means i don't have to download it to this machine and then move it to another machine so i'm just going to copy that i'm going to go open up my terminal here i'll bring that over and we'll make this a bit larger for the people on the mobile devices so i'm just going to paste in that wget command we're going to let it go out and download check mk for us so now we've got this dev that we've downloaded and it tells us here's what you need to do and i'll make this a little bit larger as well for you guys so you can see the instructions with me but it says do sudo apt install dot slash the check mk package that we just downloaded it says afterwards we can test if the installation was successful by running the the command and we'll do omd version to see if we get the version number which we should and then we can basically create a check check mk monitoring site which is the next step you have to do so this walks you right through it right here on the download page which is great so we're just going to go through this real quick and it says if we want to check the sha for the file we can do that as well they give you the sha right here to do a quick hash on it and check that if you need to to make sure that it's ready they talk about the signed package installation here and then we've got this command so we're just going to go do sudo i don't think we need sudo i'm logged in as root and i swear they said you had to do this as root but it's okay you shouldn't do this as root if you don't have to you should create an actual user but for the for brevity we're going to do this as root now we're just going to switch right back to that other machine so we're just going to go over here we're just going to paste in that command and there it goes oops it got the wrong one it's redownloading it that's fine we'll let it redownload let's see how many copies of this we have now yeah we can get rid of one of these so let's uh rm check mk.deb dot one there we go good now we're gonna clear that out we're going to go grab the correct command here and we're going to copy that paste in the right command there we go we'll let apt kind of do its thing here and we'll tell it yes we want to install this all right that completed pretty quickly which is nice so we're just going to clear that terminal and then we're going to go back and check that command i believe it was omd version there we go we get omd and it tells us that means open monitoring distribution version 2.1.0 p8.cre so this is the this is the version we're expecting it looks like the omd is working which means check mk is running so that's good so we're going to go back we're going to clear this out and we're going to see what the next step is besides the version so it says create a monitoring site so we want to say omd create monitoring so after the site's been created you will see an output similar to the lines below so we can kind of see what we're expecting here that's good i like they put that in there all right so let's go check that out omd create monitoring so we're going to do that omd create monitoring make sure i spell that right all right root permissions are needed so we'll do sudo omd create monitoring all right so here's that output that they told us so it tells us we can go to check mk slash monitoring so that's what it's dubbed this machine i'm guessing if we do hostname let's just see yep it has checkmk-ct in my case so that's what it picked up is the hostname so right here we can just go to this so we can do i think control click to have it open that up i'm not sure if it's going to open it in firefox no it's going to open it in chrome over here on the wrong page but it didn't come up yet so it doesn't seem to know how to route to that on my network that's okay we're going to close that i'm going to go back to firefox ah okay so i skipped a step we have to do omd start monitoring to start up the actual site so let's go do that so i want to get this information here which is this password so i'm going to copy that so i have it and then cmk admin is the username so it'll create a default password for you that you can change afterwards i'm sure and then right here it says omdsu monitoring so we can do that through here but i'm going to do om let's see omd start can i do it without sudo no all right we've got all okays on here so let's go back and check our instructions make sure we're doing things in the right order here looks like that's it and it says that we should now be able to get to our site so that's great so let's go and check our site again all right so if we go to it at least through the browser and use the ip address it seems to function that's good so it's just my network is not picking up on the host name that's that's an issue for me on my network may not be an issue for you guys so let's see that cmk admin and then we're going to paste in that password we copied and no we don't need to save it right now so right out of the gate you can kind of see that it's got an empty dashboard but we're up and running the server is up and running so this is step one the next thing we're going to want to do is actually go set up some hosts and some agents but there's some things we need to do in the correct order to do that so i'm going to walk you through that in the next part once you've got the server actually installed and up and running like we do you'll see that it's very empty and that's because there's a few things you've got to still do to get some hosts set up on your network or out on on whatever network you want to use now if you're going to use this outside of your own network then you definitely want to have a domain name set up that you can point to this machine and make sure that things can reach it from the outside world so you've got to have your public urls and things like that set up but for now let's just focus on internal network and doing monitoring on our internal home lab networks so one of the things they have is their documentation as i've said is really good so if you come over here and you just click on the beginner's guide it gives you kind of a nice welcome and then if you click you can go into setting up check mark or check mk and then the user interface so they get into the user interface and they tell you all about it like what do these symbols mean which is great in the navigation bar the main page the main dashboard kind of everything you need to know about the interface so that you can really kind of understand how to use the software so it's really a tremendous source of information it makes it easy so you're not having to ask a bunch of questions over in the community that are already answered here so it's really worth it to go through here and kind of look and they've got it really broken out nicely they've got nice sections that are really easy to kind of understand they're not long they don't take long to read through and and kind of see what's going on and as you get to the bottom you can just click on the link to go to the next setup so in this case setup monitoring this is what we're interested in so they talk about what are hosts and services and agents and again they they explain like why is it that i can't just set up one of these servers and just have it automatically find all of my stuff on the network and just magically start monitoring those things you you can again in some instances and they talk about that so whereas device supports snmp that simple network message protocol you can automatically get some information out of that so if you're running something like psense or open sense you can do that if you have hardware that already supports that you can do that and you can start grabbing that information and kind of mapping out your network which is really great but whenever you don't have that you need something like an agent and you want to make sure that those agents can can perform certain services so the agent that they have is just an installable agent and they have it for all kinds of systems and you go and download it and you really install it now what you do is on your actual host if you go to the setup page you'll see there's a whole lot of different stuff here and it's got this host section so again i'm going to enlarge this to make it easier for you guys to see on your mobile devices but if you look down here you've got this section that says agents and right here is where you want to go to start getting your agents that you can install on your various devices on your network and on your various machines because that's again how you monitor things so if you look here you've got linux windows other operating systems so this is going to be like your mac os freebsd things like that most likely and then you've got vms you've got cloud you've got containers so again you can even set this up to monitor different things on your network like vms cloud and containers things that are off your network like the cloud in particular you've got other integrations that you can kind of check out on your own but i mean they've got a lot of stuff here for what you can do for the agents and in particular and they've got a lot of really great stuff here in the setup area that you're going to want to check out that's probably beyond the scope of this tutorial but i want to get you guys at least set up a little bit so i'm going to go back to the documentation for a minute because they talk about what are all these things and then one of the important things that you really need to jump down to here is preliminary considerations for dns that's better if you have dns that makes it routable to your different devices if you haven't a professional level network if you're talking like small business up to enterprise level you should have something where you can route by by host name and you should set up your network in that way if you're at a home lab like mine or you're just at your home you probably don't have that you might if you're somebody who kind of is into that and you want to do that and that's great but they're letting you know like hey you know the more you move up and the more you do this the more you're going to want to have host name resolution so just be aware of that the other thing is folder structure for hosts so the way that this works is there's folders that you can create through the user interface and we're going to go here to hosts and then click on hosts and you'll kind of see here it's got these different things and it's got this thing that says add folder so i'm going to zoom this up a little bit more again because it's really small but you're going to click on add folder and really what you want to do is create a folder structure and they tell you what that structure should be so we're just going to go in here we're going to call this first folder linux and they tell you that by default things are not expanded that don't need to be and things that are in basic mode are expanded so you can make those choices so here we're going to call this linux and we're going to we're just going to say is this going to be like a monitoring agent check mark api integrations what are we looking for snmp what kind of things we're going to have in this folder and most likely this will be agent so i'm just going to check that box it's all good and then we're just going to hit save and you'll see that now we've got this linux folder so i'm going to go ahead and hit add again and i'm going to call this one windows for windows machines and same thing we think this is probably going to be mostly check mark or check mk i keep calling a check mark and that's bad it's check mk agent and api integrations so again we're just going to hit save and then this last one we can do is network and we can just put like network hardware and stuff and we'll we'll assume that that's going to be snmp and we'll check that box and it's this doesn't really set anything it's just kind of like a tagging system in my opinion so we'll hit save again so we've got these three folders now we're gonna go and we're gonna go back into that setup we're gonna go down here to the agent section um let's see i'm looking for agents because i zoomed it up it jumped over here sorry i'm gonna go to linux because that's what i'm going to set this up on and i'm actually going to set up the check mark system i've got running first just because that makes sense we're going to monitor the system that's on now the one thing it can't do is a full failure it can't tell us that something happened there because it fully failed but it can tell us about anything weird that may be happening with the system so you've got a couple things you got a deb you've got an rpm you've got the cli tool so you've got a few different ways you've got scripts you've got all different kinds of things you can do here and and just look at this i mean this is a long list of things that you can check out i'm on a ubuntu system so i can just grab this deb and i'm going to pull it down and i'm actually just going to right click and copy this that way i can just pull it straight over the system and i'm just going to do a quick switch over to my terminal here and i'm going to do wget and then i'm going to paste that in and we're going to do an ls and we'll see we've got that check mk.deb right there and it's the agent is the one that we're looking for here so it's this agent right here so just to be clear which one there's two there i can remove this other one i can do rm check mk raw and then we only have the agent left so now we can do sudo apt install dot slash check mk and again that dot deb and we'll put in our super user password we're gonna let that thing run it's gonna go install a few things and really it should be up and running now now we can do something really simple to check and make sure things are running so we're going to do sudo system ctl status so we're going to check the status of the check mk agent there we go to socket and we just want to make sure that that thing says active which it does so if yours doesn't say active you may need to do something to correct that i don't know what it would be at this point i haven't had this have a problem so far so we're going to clear this out now we're going to go back to the browser and we're going to see if we can find what we're looking for here so we're going to go back to setup and back to hosts now what we're going to find is if we go to this right now we're still going to have nothing it's just going to load up it's not going to have any information because it's not set to be monitoring anything yet because while we've set up that agent we haven't told this thing about it so we we go and set up the folders we're going to go set up the agent we're going to go back into hosts we're going to click on our linux folder since that was what we just set up just to keep things organized that's really all this is just organization you can set this up in any way that you want to you can set up tree organizations and all kinds of things that you want to do if your network is massive this is going to be a good way to kind of keep things organized in here so it's easier for you to find stuff but we're going to say you know what we need to add and a add a host right here so we're going to click add host and it's going to ask us for a little bit of information so this one has a host name and we can go and see what that host name is pretty easily with a single hostname command and it's just check mk-ct because it's it's a container that's why i called it that so we're going to type that in okay and then we're going to tell it an ipv4 address so we're going to check that box and it's going to give us a blank and we're just going to type that in okay and then if you continue down you'll see what kind of monitoring do we have we have the check mk agent and api integration is what we're using we're not using snmp and if you want to expand these you can kind of check out what other options there are this is nothing that we really need to do right now that i'm aware of if you have snmp credentials you would check this box and type those in but i think we're good i don't think we need to do anything else here so we're just going to click on save and go to the service configuration so what you'll see is that it's actually going to go out and scan the machine so it's scanning itself right now actually and it's just counting up seconds you just need to watch and be patient while it does this so it's trying to reach this device over the network and make sure it can find it and then it's going to come up and tell you like hey here's all of the things that i found and it's like the check mk agent it says warn uh and that's probably because it's running on itself this is the first time i've seen this i didn't set up the agent the first time i set these things up then it's got cpu disk so it's going to grab all this stuff memory so it's going to be checking all of these things to make sure they look okay so what we're going to do is go through and click on the plus for the things that we want to move to a monitored service i'm going to go ahead and click on memory as well so since this is running apache it's giving us the option for omd monitoring of apache the event console monitoring performance we have post fix options here as well tcp connections uptime so uptime i always like to monitor so we'll click on that one and you can see as we click on things they disappear off the list so that looks like a pretty good set of things to monitor so we can see here we have an active check happening so it says pending which is the check mk hardware software inventory so it's actually checking that server to see what all it's got on it so i've got some systems that i set up yesterday and i wanted to kind of show you that in this other uh in this in this docker version that i'm running and i'll show you how to set up the docker version here in just a minute but once you've got those set up and you've run through that activation process i've got a couple here it's just two and you'll see it's going to start up here and it shows that i've got two systems basically that are up 77 things that i'm being that are being monitored that are okay i've got 88 total so it's got five that have or three that have warnings so we can look down here and see what these three are it says interface 19 so it shows that it's a 10 gigabit per second i i doubt that this is probably an internal thing and it's basically getting you know expected 10 megabyte per second so there's just something misconfigured about one of these one of these uh interfaces on this machine that's fine but checking mk discovery is just telling me hey there's three unmonitored services so i could click on this and it'll take me and it'll kind of tell me a little bit more detail about what those are and it's interfaces and again this is where i run a lot of things with docker so you got to be aware that this is going to find a whole bunch of special interfaces for docker and bridge interfaces so it doesn't have to monitor everything most of the time but you know maybe something that you want to fix so if we go back to the dashboard so the ntp time again it's got a warning and it says that it's got a little offset and the last sync for this machine was about 38 minutes ago so there's something going on there so we look over here you can see a bunch of events for the last four hours basically which is pretty cool so the more you add these machines the more you the more you add to the system the more you're gonna see different things that are happening so i think this is pretty great and again there's a lot of different views that you can check out so you can add you can see dashboards here so you can say main dashboard check mk dashboard so you've got some dashboard options you've got display options as well and then help and then a few options out here so we go over here to monitor we've got a few different things that we can see and if we go here to customize we've got even some more options that we can see so there's a lot going on that we can actually kind of check out so you do have a user section so you can go and add users to the system that can actually access this and monitor it and then you can set up rules and permissions for those users just like many systems that are out there again i'll leave it to you guys to kind of go through and say you know what i want to check this out and see what else is there as we go through though you have contact groups and roles and permissions just like i was talking about so you can set up the rules and permissions apply those to your groups or to your users you know put your users in groups to make things easier of course you've got notifications so we can go in now it's going to tell me i haven't configured notification stuff yet so just be aware i haven't set up my fallback email address but you'll want to know your smtp information and then set up your email address so that you can get notifications and send notifications through the system as well maintenance wise you have backups capabilities so you can go here and create backups download those things in case anything happens you can bring the system back up basically the way that it was and have a have a good way to kind of bring things right back up and get it going again if you need to so you can also customize your dashboards so you can go through and actually change up the way the dashboard looks the way it's laid out add different things that you want to see or don't see so i think that's pretty great i mean you're getting a lot of power out of the box and again this is an open source project which is really awesome you can add other dashboards you can create your own dashboards as well so that's kind of a nice feature whenever you start thinking about how do i want to make this thing work i want to add a new dashboard and kind of configure that so you can have more than one so when you go here to the dashboards you can see you've got this thing that says dashboard you see we're on the main dashboard we can check this check mk dashboard we don't have it really set up yet but we have the option there to switch so as you add more you'll get more in that list and you can switch pretty quickly and pretty easily there again with the display you can filter things out you can put this page without navigation so if we click on that you see the navigation on the left goes away so you get a little bit more space for the actual dashboard and information itself and then you can put the navigation back just by clicking on this page with navigation so with all the information that you get here from the main dashboard you've also got this little right side menu so no matter where you are you can always pop this out and then close it it's here in the bottom left and you can really configure this and right now it says undefined but what you can do is close this out you can close all these things out but you're getting a little bit of information about what things are on or off here from the from the master control but then you can click on plus and it brings you to this screen where you can add different sections and as you kind of scroll through these things you just click on a section to add it over to the right side so as we go down you can kind of see some interesting information so like the overview will get it i don't know why it keeps refreshing and going away we've got this nice little speedometer needle that kind of tells us like you know how how much of the server are we using up to get things running so you can kind of customize that and then when you're done with it just close it when you want it back you open it back up but there's a lot of little widgets there that you can put there as well so i think really kind of a great tool from that perspective this really does some really great stuff and as we look here again just looking at the different options for the monitor so you get a lot of options here just out of the kind of the gate from from looking at it from an overview standpoint you get the main monitor you get kind of your main dashboard you get all hosts you get a host search so if we click on all hosts let's just see you can see here kind of what's going on and we can see that it's up okay we've got the host information there and then if we go back into monitor you get this network topology which is kind of cool so as you build out your network you'll see kind of where things are in relation to each other so as you're building this out and installing it on different devices you kind of get a nice topology of the network there which is really great you see this in a few different applications these days and being able to do this really nicely is important i think for a lot of people in a visual visual sense of where things are at in the network and how they're communicating so very cool there you have service groups you can see scheduled down times if you have any of that stuff and then of course you can see any kind of comments that people have left if there's problems you can see that as well so you can click on here and kind of see any problems here we've got warnings that are happening so again we can kind of see a concise list but you can again go back and set this up in dashboards so it's really easy right when it first comes up to get a nice overview of your network of the devices and machines on your network and see what's going on with them and to kind of monitor those things and know when there's something going on that you might want to pay attention to so you can go in again click on these things to check them out and see what's happening and see if it's something you need to go address so this is check mk i think again this is a terrific network monitoring tool and it's really a network and system monitoring tool which is pretty awesome getting it set up really isn't that hard and i really just think that you guys would enjoy this tool as well i'm going to go ahead and show you how to set this up in docker right after this so now we're going to do this in docker it's really really straightforward we're just going to go ahead and get into whatever server you want make sure you've got docker and docker compose installed on it now if you want to set up an actual url and you're doing this on your home lab you'll want to do your nginx proxy manager setup or your traffic setup depending on what you're using for your reverse proxy you'll want to have that too if you've not done that before i've got tutorials on how to set up docker docker compose nginx proxy manager and even portainer for like having a nice web gui for managing your docker stuff as well i've got a script out there that'll install all those things for you in one run and i've got to fix a few things there's people who've been giving me some feedback on it so that's great and i appreciate it but generally it runs pretty well especially for using ubuntu um as your base system so so just be aware of that but i do have it for centos arch ubuntu debian i need to work on alma and rocky they don't work from the centos version for some reason so if anybody gets these things to work or you want to check out my script or pull it down and fix it so that it works for those as well feel free i'd be happy to have some pull requests for that too so right now i'm just going to assume that you've got docker docker compose installed on the show notes i'll have a section on it about how to get that set up and ready and we're just going to basically go through my normal procedure so i always like to have a folder called docker that i keep everything in for docker so i'm going to see the end of my docker folder i'm going to do an ls and you can see here i don't have check mk yet so i'm going to create a folder for check mk with mkdir check mk and i'm just going to do cd check mk now do an ls you can see there's nothing there and i'm just going to clear that out and i'm going to create a dockercompose.yaml file so i'm going to say nano which is a text editor in the terminal docker hyphen compose.yml so we're just going to paste in some text and again i'll have this in the show notes so you can just go grab this and copy and paste basically but it's going to be a version 3.3 of this docker compose yaml and then the services that we're going to run is just going to be check mk raw and right here it's going to have a section that says ports and it's going to forward 8080 to port 5000 for the application that's running then they've got a couple of things where they're setting up a temporary file system in slash opt and that's fine don't worry about that temp fs is going to be slash opt slash cmds or omd slash site slash cmk and they've got this stuff set up for pitt and the gid that's fine then we've got a volume we've got a couple of volumes that we're gonna set up here as well um we don't actually have to have this this one set up but it's fine to set it up because it's just setting up the local time so that you've got the right time so you can kind of leave this as it is this one's going to set up a volume inside of your your content your folder that you have here for for monitoring and then we've got the container name which is monitoring you can change this to whatever name you want you could call this check mk if that's what you prefer to call it doesn't really matter but monitoring is fine it's going to restart always basically so if you restart the server it's going to it's going to restart itself if it has an error it's going to try to restart itself so so there's a lot of conditions that make it basically make it restart itself so it doesn't crash and just stop running on you and then it's going to use the image of check mk and then check mk raw and they have 200 latest is what they have in their documentation i think we had a 2.1.0 so you can go out to github and or i mean sorry docker hub and check and see what their latest version is but they said they do suggest pinning the version number instead of just pinning it at the latest thing because the latest thing may not be stable always so it just depends on how you want to run things but we'll run with what they had in their documentation it was very very very easy to get this kind of set up and use this as a docker compose now if you want to update it you'll want to watch their their releases and make sure you know that there's an update available and then change this version number and then go and rerun the docker compose up command that we're going to do here in just a minute so once we've got that we're going to save it with control o confirm the name just hit enter and then control x to exit nano and now if we do an ls you see we have that dockercompose.yaml file there now we can just do docker hyphen compose up and if you want to see the logs as it goes you can just run this and then but if you do ctrl c it's going to stop and then you got to run docker compose up dash d to run it as daemon so what i like to do is just run the dash d and then do two ampersands docker hyphen compose up or i mean sorry logs dash f so docker compose logs dash f at the end and basically what's going to happen is it's going to run this command first it's going to bring this thing up and run it as a daemon in the background and then as soon as it finishes with that it's going to show me the logs for what's for what's going on so i can kind of monitor what's happening with it so i like to run this the first time at least just to make sure everything's running i don't see any weird errors stuff like that so we're going to go ahead and hit enter it's going to go out and pull down the image which is what we expect it's got a couple of good size uh pieces here imaging pieces to this image that it pulls down so be patient because it pulls it down then it extracts it this system runs pretty fast i've got this running on one of my virtual servers so it goes pretty quick now this is probably one of the biggest ones it's about 180 megabytes so it takes just a second to extract that out once it's done it's going to start up the actual server and you'll be ready to go so now it's going to start the server we should get a done message right there now it's going to start showing us the actual logs that it's putting out so you can see there that says creating a state generating a configuration then it gives you an okay and then it runs through a few other things here and basically it's doing all those things that we saw and that we ran kind of manually and you can see here that it says hey i'm starting up this thing and you saw that okay remember we had to go start the actual site running then we could log in so you get the same thing you get this hey here's the admin pass and then here's the password we have to have so we want to copy this make sure to either right click and say copy or you know control shift c once you've highlighted it and then your your admin user still see cmk admin and of course you can change that in the user interface but right here it's got this kind of long thing because docker gives it a weird name so again we just want to use the ip address to get to it so we'll just do a quick switch over to the browser here and we're going to open up a new tab and we'll see if we can access this thing so we're just going to do http colon slash 192.168.10 and i did this on dot 42 lab and we're going to do colon 8080. it's going to try to reach that address and as long as you don't have something already using 8080 on that host you're going to be set if you do you can change that 8080 in that port mapping to something else but in this case we're going to zoom this up a bit we're going to do cmk admin and then we're going to paste in that password we copied now if you're not sure of your passwords you should definitely go in the first time you log in and change that so let me just show you where that is real quick um if we go here under users so you've got a few things there and then here we've got the change password for our user basically so you put in the current password that you just had and then put in a new strong password that you want to use and you enter it again to make sure you typed it correctly and then you can just hit save and it's going to go and it's going to tell you like hey this thing was updated successfully so now you could log out log back in using that password that you just set so you know what your password is of course you should use a password manager if you can check out my video on vault warden for that if you want to self host your own password manager but that's it we've got this thing up and running we're ready to go and actually start doing all the other steps that i showed you which is create that folder go download the actual file that you want to put on your different machines and then start monitoring your machine so now we're running in docker instead of on bare metal like the the first one that we did here but in this case you can see so yeah this one logged out timed out so there we go but yeah we've got everything kind of ready and set and i'm up and running with cmk with check mk which is pretty cool i'm kind of liking this i'm going to keep messing with it i'm going to go out there and add a bunch of more of my my devices and kind of start really monitoring my network devices and seeing what all i can do with this thing but it looks like a really great product i really like it i hope you guys enjoyed this if you did like subscribe tell your friends about it so they can come along in the open source journey with us and i'll talk to you next time [Music] you
Info
Channel: Awesome Open Source
Views: 82,427
Rating: undefined out of 5
Keywords: open, source, opensource, open-source, self, hosted, selfhosted, self-hosted, free, libre, software, server, web, internet, browser, linux, mac, macos, windows, microsoft, vps, tutorial, how to, setup, installation, instructions, cli, command line, terminal, interface, open source software, open source news, open source projects, network, montior, monitoring, nagios, cacti, zabbix, cisco, juniper, pfsense, opnsense, snmp, agent, checkmk, check mk, system, machine, device, cloud, aws, azure, vpc, vpn, flow
Id: 7OnhuCsR7jg
Channel Id: undefined
Length: 39min 44sec (2384 seconds)
Published: Wed Jul 27 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.