How to Monitor Memcached with Prometheus and Grafana | Grafana Dashboards for Memcached Metrics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome back to our channel so today we will learn how to monitor M cast with Prometheus and grafana mcast is widely used in memory key value store for catching data in distributed system so to monitor its performance and health we will use Prometheus a monitoring and alerting toolkit and graph a visualization platform and together they offer solution for monitoring mcast so first let's see the prequest sites first you should have an AWS account with over2 ec2 instance running then you should have basic knowledge of AWS Services Prometheus and graph so let's move on to the Practical so first step is install mcash on ub2 so first update the package repository the command is sudo AP update now our system is updated so let's install the M cache now the next step is install prus on to so first from the DAT repository download the latest version of promethus so let's copy this command and paste it now the download is complete so let's extract the downloaded arches now all the files are extracted so let's move them to the X Library so first let's move to the extractor Library which is Prometheus now let's navigate to the PC system D system this is where typically the system D unit files are located so let's copy this command paste it now let's create a service name ch. service PR I to enter the insert mode first let's copy discorde here in the unit section the description provides the description which is Prometheus then one time after these the are the directives that specifies the dependencies of the service and here it indicates that the prus wants to start after the network is online then in the servic section the exact start this specifies to start the service and here is the part to the Chrome and its configuration file then the start isal to always the service will be restarted automatically then in the install section wanted by equals to default. Target this specifies the Target that this service could be associated with when enabled so let's save the file then call W to exit now reload the diamond service to verify our file is correct after reloading the diamond service enable it now let's start the Rus service after this take the status for to. service file this command will tell us if our file is running properly on not as you can see our service is active and running properly let's just open our the tab now our next step is installing graph onov to so first import the G PG key using graph package after importing it add the gra graph source hit enter update the package list before installing now the package list is updated let's install the gra our graph is also installed so let start the graph service command is same Soo system C start graph server then enable it after this you can access the graph page just go to the bre page first copy the public IP before address of your to ur column ofana give the username and password so ID is default username and password now it will ask you to give the new password or you can do skip the process so this is the welcome page of grafana you can even access the pr just copy the public ip4 address past it in url then colum sorry port number 9090 which is default port for PR Plus and this is the web page for pro this so now our next step is create a user group and user for PRS copy this command this will create group named from some will create a user which is also named CHR let's move to the next step which is download and install M cast exporter first found the GitHub repository download the file on the exporter after downloading it extend the downloaded RG file so let's copy this command paste it now its files are expected move the binary file to user your local take version this will also help us to confirm the installation of the M cage exporter as you can see our main patch exporter is installed successfully it's showing this its version build user build platform and tags also so our next step is configuring M cach text service so first we will create a service file for exporter so let's copy this command press to insert mode so this is default name catch exporter service so let's copy it and paste it here in the unit section the description defines the service which is pro M Cas export documation documentation provides the link of to the documentation of the exporter then once and after specifies that this service depends on the network being online before starting in the service section the type is simple it specifies the user is preus group is also preus then exit reload command to reload the service and ex start command to start the service CIS lock identify sets the identifier for messages loged by the service start equals to specifies the service will be restarted automatically if it exits unexpectedly then the service will be restarted then in the install section wanted by is equal to multiuser not Target which is a system Target or non-graphical multiuser system so let's save the file PR then colon W to exit verify our configuration is correctly by reloading the diamond service so let's run the now let's enable the exporter finally started now let's check if it's running properly or not Pro System C status m c exporter command as you can see our name cat export is active and running properly let's just open another [Music] T now our next step is configuring the M cach exporter and pointing Prometheus configuration so let's navigate to the this directory here next open the chrome. this is the configuration file for chus here it has Global configurations manager Ro files scrap configurations so let's add we add in this name cast server part in the scrap confs so it has job name specified as M cach then static configuration where it has the targets which is Local Host 9150 9150 is default PLL for cash so let's save the f after editing the pr. restart the promethus do service this will restart our prome so let's go to this PR Cas here here go to status and then targets uh refresh here you can see our m c is configured now our next step is setting up graph on a dashboard for M cast Matrix so let's go to the graph in the left side go to the home bar then go to connections and click on data sources click on add data source select Chrome withus as your data source then scroll down in the connection from the server URL copy your URL on which your Chrome test servic is R scroll down and click on Save and test so you will get this message which is successfully qued the pro API from the right upside Corner click on the plus icon then click on new dashboard you can also import the dashboard so we are going to create a new dashboard click on ADD visualization select prus as a data source so now this is your panel time so let's add the query select the metric this is the matri Explorer here you can have many solutions for your Matrix I'm going to use just m [Music] process CPU seconds total so it is specifically St to this quy what this does so this query the total amount of time consumed by the name cast process in the system mode select the level and job and select the value [Music] as you conf quy so this is a Time race graph you can even give it in a part CH oops you can even change the time duration like for last 5 minutes 15 minutes so let's see for last 15 minutes let me just add another quer user SEC seconds totem so what this quy does this ques the total amount of C time consumed by the main cast processing user mode mest and the query and you can see the both queries you can save the panel by pressing the Control Plus s and getting the appropriate [Music] title has and it andit it anytime so today we have learned how to set of monitoring for M cast using Pras and grafana and this allows you to gain insights into its performance and troubleshoot issues Prometheus collects Matrix and grafana provides the visualization and with this you can keep M cast instance running smoothly so that's all for today guys and thank you
Info
Channel: DevOps Hint
Views: 155
Rating: undefined out of 5
Keywords: How to Monitor Memcached with Prometheus and Grafana, Grafana Dashboards for Memcached Metrics, Install Memcached on Ubuntu, Download and Install Memcached Exporter, Configuring Memcached Exporter Service, Configuring Memcached Exporter Endpoint in Prometheus Configuration, Setting up Grafana Dashboards for memcached Metrics
Id: 1IgCQ7RYyFM
Channel Id: undefined
Length: 24min 22sec (1462 seconds)
Published: Thu Apr 25 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.