Deploy MySQL on Kubernetes | MySQL Exporter | MySQL Monitoring with Prometheus and Grafana #mysql

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign topic setting up my SQL DB onto the cluster and doing that monitoring using dracana before getting the details of this topic this is a quick playlist that you can go through the grafana playlist here we have 11 video to understand about the end to end grafana setup and doing multiple things like zero integration doing lock key logs Racing for Tempo and then 13 exporter and finally doing this you know con AWS cognitive authentication for measuring managing users of admin editor and viewer and finally we did you know Black Box exporter in a large session so if you're not like And subscribe this Channel please do that so that you can get similar kind of videos related to graph online kubernetes and on the same channel like okay quickly moving on to the today's topic will be first of all doing in my sequel DB installation onto the cluster and then we'll integrate this MySQL with grafana token so that we can see all the data which is presented as a DB in the form of tables and ultimately we'll be installing a MySQL exporter uh Prometheus Community exporter which will track and you know monitor your mySQL database in an automated fashion and then finally We'll add 13 uh dashboard to monitor that piece with the help of you know uh you know GUI and on top of it we can definitely set up a lot so that your kpis are up and running every time so this is all about theory of this let's quickly see the uh the Practical aspects of it I have a GitHub page for this you can simply come here and break into this GitHub page this is my GitHub page for this MySQL you can follow it and just run it on your any of the cluster whether mini Cube or any other Cloud related cluster so let's see what are the steps in this so first of all we need to definitely install uh you know my equal database onto the cluster I am using this Vietnamese Helm chart so you can add this report to your repository if it is not there [Music] to all the steps are really straightforward I'm just installing my my SQL using this repository which I recently updated okay I am installing into my current namespace where I'm I'm located and I'm very pointed out so currently I am into Matrix namespace so you can see this has been installed and let me see the checking of its AGP I can see the mythical part is running and there's no and there's a service also running for technical support the thumb chart has been upgraded so you can see uh this has been upgraded today only you know third revision and data service which is the the install IP service point so this is just a vanilla installation of my sequel but first of all that CD let's get into the Container before getting into the Container we need to see the secret because there are certain secrets that I've created with installation of MySQL so this is the root ID might equal and the root password so let's gather this speed because it could be required for logging into the my equal I'll take this and then we'll do a basic record decode and we'll copy this field somewhere maybe into a node flat oh this is a might equal password root password and user is root okay now I'll just get into the MySQL container now this is my container now I'll just do a login to this container okay so I'm inside the container now I'll do a login of this MySQL minus U is nothing but your user this is the user ID minus p is the password which I just copy pasted I'll do based now inside container algebra 3 how many databases are there the default database okay I can just use one of the database like hey now I'll see how many tables are there in this MySQL and then I'll do uh select star from user summary okay so there are default tables and database that we can use it for our testing purpose so let me come out of it exit exit Okay so my first step is done I can see the tables are successfully installed I mean the multiple successfully installed and I'm able to see the data also now let me install the grappana so that I can do the integration of this MySQL with krakana this is the very popular QR stack installation on to the cluster so all these things are already there matrices all resulted run this to install grafana onto the cluster welcome here I'll just send it please and this will install my queue Prometheus black Helm chart with release name called as kirkana and next piece we will simply do the MySQL exporter installation that will expose all the MySQL related matrices to to do you know to an endpoint and then we'll consider that endpoint into the grafana so yeah let me see the helm really for this click on the other second division revision deployed just now you can see it yeah the date timestamp you can clearly perfect so Griffon is there might equalizer let me install the MySQL exporter also that will just expose all the DB related matrices now this is there I'm just doing a report okay now before installing this MySQL Twitter if you remember the golden rule of other we need to have the service monitor enabled through installation so this is the third separate installation I'm doing for doing my SQL installation Bracken was grappana third is MySQL export which will actually find all the metrics do so that's the reason now construction which is again very very important I want to read the data from my MySQL DB which is being installed on first step now definitely I need to give 13 host name password is the same root password which I just copied it now you can see what is this host name now this is a load balancer service IP let me show you the service now this service is currently running in a collector IP okay so let me edit the service and made it to a load balancer so that we will get an IP okay so I have edited this now I've got this IP this is the external IP since I am using mini Cube processor so it is assigned the same IP which was assigned earlier okay so this is the user root this is a root ID password this is the code name and into the port so basically this exporter will connect to this database using these values and will send the data to the grafana using this configuration you know with so with multi-enabled as true this is very important to understand because this point is doing your integration with rafana so let me just install this piece I'm going to install it onto my machine and I'll check the film release version for this so this is currently second yeah it was installed and you can see the date time sample so right right okay perfect so let's see the service before jumping onto the gurpana so we have a MySQL service running on load balancer IP now we have another exporter service which is capturing all the matrices so let's see the pulling all the data from your DB and that we will be using to the uh grafana that will be sending it to grafana for monitoring constructive now let's quickly see the end point for this yeah this is my frequency exporter and this is when you click on the Matrix that you will see all the matter related to theme I equal show tables all those things so this is the detail level of matrices that are going from your cluster to this endpoint now we will configure this endpoint onto the the corner I mean with the help of this label it is already going I will show you in a while so the label you you this is very very important piece if you don't give this label then Cube Prometheus you know crd will not be able to read it and so with multi-enable equals to True is making sure that the with monitor has been created right perfect so let's let's quickly jump on to the let me show you the service pointer also so this is that service monitor that has been created uh you know recently and this is responsible for sending it to let me show you the importance of that label so this service monitor is actually having this label which is actually reading your service and then sending it metric from metric endpoint to the gripana endpoint perfect so let's quickly see the final piece a port forward I'm just forwarding the kirkana port and I'll just login I'm doing this thing pretty slowly because it's very important to understand we are doing it let me talk out admin password is again same from operator vrom so you can change this password by looking at my previous videos but yeah just keep it like this fine so I go to the export floor mode and then let's see what all jobs are coming there would be one job uh related to your uh MySQL exporter will see it let's do it for yeah so you can see this MySQL exporter yeah this is the one right so this is the job that is coming and pending where all the mattresses to uh this the kripana fine so let's do the final piece let's import the dashboards now for dashboards you can simply go to this documentation uh documentation provider so this dashboard will help you to understand the data so I'll import the dashboard this ID okay it's already there good so I'll just type my SQL I've already imported these Dash but you can simply import it and you can see the data is coming see the moment you import that I put all your MySQL stats are coming properly let me delete it in front of you and then import it again so that it becomes pretty clear fine so I'll just import the dashboard again code and on four okay the export.code which is showing your uptime of 36 minutes you know in no DB buffer pool current queue with my equal connections red count all these things were coming you can customize this dashboard as per your need as well now there's another dashboard that is being provided by grafana open source Community which is this one the MySQL overview so this also you can just simply import select the parameters and then you can see the data uptime is 1.1 hour you know and all the other outputs operating and from where you can get all these dashboards again I provided the link so that's what I'm talking about right MySQL exporter and the other one is my SQL overview they don't need to do anything fancy you need to just copy paste this dashboard ID and then import into the uh you know collector so potentially we did all only four steps to make this happen up and running you can see portable we installed my SQL you know database I'll show you the helm chart finally so first of all we install mySQL database independently right and then we install gripana independently do these two independent entity and then the third we did this integration using MySQL exporter where we passed MySQL credentials to this exporter so that it can communicate to Groupon and Metric this so this is the one which is doing all the integration and you can see the value and fourth and finalists just you know importing the dashboards so yeah quickly wrapping up wrapping it away in uh this is again very important topic where you can quickly install a database for Microsoft with application and then do plug and play whatever you need and on top of these dashboard you can set up alerts also that is something fairly easy you can follow my alert related videos if you want but yeah so let's wrap it up I mean that is pretty much for today I hope you like it if you have any questions and you know queries you can post into the comment section and please like And subscribe the channel so that you can get all these related uh new concepts related to microservices kubernetes at your doorstep thank you for now thank you bye
Info
Channel: Bhoopesh Sharma
Views: 1,230
Rating: undefined out of 5
Keywords: exporter, grafana, grafana dashboard, grafana dashboard creation, grafana prometheus, grafana prometheus dashboard tutorial, grafana tutorial, grafana tutorial for beginners, helm, helm chart, kubernetes, learn grafana, monitoring, mysql, mysql exporter, mysql helm chart, mysql on kubernetes, node exporter, prometheus, prometheus grafana, prometheus monitoring, prometheus monitoring dashboard
Id: Oauz5EDh3OM
Channel Id: undefined
Length: 15min 0sec (900 seconds)
Published: Sat Sep 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.