8:Monitoring Linux and Windows using Prometheus and Grafana with Node Exporter and WMI Exporter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome back to devops in this video we are going to learn how to monitoring linux and windows server using prometheus and graph now and in this video we are going to discuss these uh five points what is prometheus what is graph now what is not exporter what is wmx porter and in last how do monitoring linux and windows server using prometheus and grafner so let's start from first what is prometheus so prometheus is open source linux server monitoring tool mainly used for matrix monitoring event monitoring alert management and etc prometheus has changed the way of monitoring system and that is why it has become the top level project of cloud native computing foundation that means cncf and prometheus uses a powerful query language that is promql in prometheus tabsaran handles and microservices and prometheus use multiple modes used for graphing and dashboarding supports so that's the prometheus so the next is what is graph now so graphene is a free and open source visualization tool mostly used with prometheus to which monitor metrics and graph provides various dashboards charts graphs alert for the particular data source and graph now allows us to query visualize explore matrix and sets alert for the data source which can be system server nodes cluster and etc and we can also create our dynamic dashboard for visualization and monitoring and we can save the dashboard and can even share with our team members which is one of the main advantage of graph now so that's the graph now so the next is what is node exporter so node exporter is a processor for server level or os level metrics with configurable metric collectors node exporter is a good solution to collect all the linux server related metrics and statics for monitoring and prometheus not exporter provides hardware and os level system matrix exposed by mixed kernels through metric collectors and no exporter is needed on all server or virtual machines to collect data on all nodes and node exporter exposes matrix on slash matrix and sub path on port number 9100 so that's the node exporter so you can see here server monitoring using prometheus and graph now so here you can see so the firstly target server node exporter prometheus and graphna so in short this server is monitored by prometheus and visualized so the next is what is wm exporter so wma exporter is an exporter utilized for windows server to collect matrix like cpu uses memory and disk uses and it is open source which can be installed on windows server using dot msi installer and you can see a windows server monitoring architecture so you can see a server windows server wmx sporter prometheus and roughness so graph periodically query sends to prometheus and prometheus sends scraps to uh exposing metrics on port number 9182 and you can see the wmx porter running as a windows service then in windows server so that's the windows server monitoring architecture so next is so let's see predictive sites so firstly you need a good internet in your connectivity then second secure securely groups configured properly and then any web browser and then security groups configured on easy to instances so port number nine zero time prometheus server then port number 9100 for prometheus node exporter then port number 91824 wm exporter and the last port number 3000 that means three thousand is graph now so that's a precise so now so let's install prometheus so firstly before that let me show you uh so you can see here my instance probably uh with the name prometheus and if you go to the security so here you can see this here uh here uh in my security i have open port range or all port number you can see all so if you want any specific port number then you can add from here so now let's start to install so firstly we are going to install prometheus so now here i'm using mobaxterm to connect my ubuntu terminal so clear the screen first so now you can see here so now we will follow this article so i will give it to the link in my description box so you can install easily using this article so firstly we will update the system repository command so copy the command okay it's done so clear the screen so the next is now switch to root tweezer if you want to switch to your root user so you can run the command otherwise just skip it so now we are going to creating prometheus system uses and directory so firstly we will have to create prometheus user so now we are going to run this command then now the second comma for quarter okay it's done now we are going to create directory for prometheus okay okay it's done so clear the screen so now the second step is update prometheus user so as user groups and directories are created successfully which store the prometheus data and files so now we will have to update so now run this command to update prometheus user okay it's done so now the next step is download prometheus binary file so now we will download the latest version of prometheus so you can see the promise official page of prometheus so click on prometheus and you can see here for linux so click on right click and copy the link address and now we are going to download with wk so firstly you need to inside slash dmp then we are going to download prometheus with dublin so yeah it stands to clear the screen and the next step is install properties and uh graph now so firstly we are going to extract the files using tar command so ls then you can see a prometheus so now we are going to extract the files sorry star using tar command so it's done now clear the screen and now you need to inside the prometheus first so copy the file and cd and paste okay now clear the screen and the next step is you can see move the configuration file and set the owners to the prometheus user we are going to these three commands to configure move to configure and now last okay it's done now the next step is update prometheus user ownership on binaries so now we will update the users and group ownership on the binaries of prometheus using following commands so run this command to update prometheus owner or your ownership on binaries the second command okay it's done so clear the screen and now let's check the version of our prometheus so for that run the command prometheus hyphen iphone version so you can see the details of our prometheus platform linux and date and version so now clear the screen now the next is you can see prometheus configuration file so we have already copied slash dmp prometheus you can see here so ymir file so now let's check our configuration file so you can see a configuration file so you can see here right now you're only one job with the name and the port number is 909c so we will change it we will after installation of graph now or not exporter wmx porter we will add more uh in this we will add two more jobs so right now exit so the next is creating prometheus system file so now we will create a system service file in this location so for that run this command and now here we are going to add uh so we are going to copy the below files into this directory ctrl x save the file and exit so yeah it's added now uh now we are going to uh you can see uh use the newly created service we will have to reload the services so now we are going to firstly reload the system first then we are going to start our prometheus uh server so now we are going to run the command sudo system ctl start prometheus then we are going to check the status of our prometheus so we can see the status active running that means it successfully installed prometheus in our uh system so now so now we are going to accessing prometheus in our browser so you can see here run this command sudo 19090 slash tcp rules updated so now firstly uh to access prometheus in your browser so firstly you need a ip address so copy your ip address and you know the port number of prometheus 9090 so here you can see our prometheus ui prometheus and if you go to the status and click on target so you can see you know your running job prometheus and state is up that means it's running so now our prometheus is successfully installed installing our system so now it's done so now we are going to installing graph now so the next step is we are going to installing graph now so for that so firstly download the graphna gpg keys with the w gate so you can see the command so now we are going to install graph now slow clear the screen and now copy the command so okay so the next is next add the grafner repository to your apt resources so for that run this command so yeah it's also done so clear the screen first and now the next is to update system packages so run this command to update system package so yeah it's also done so clear the screen and now the next step is you can see you can now proceed with the installation so now we are going to install graph now so yes i want to install so you can see here it's installing graph now on ubuntu yeah it's done so clear the screen first and now the next step is you can see a start so once graphene is installed use systemctl to start the graphna server so use this command to start our graphna server so now let's check the status of our graphness server so run this command sudo systemctl status roughness server so you can see running that means it's successfully installed in ubuntu so so it's successfully installed so the next is you can see here so it's installed so now finally enable the graphna server so run this command to enable graphna service so okay it's done now to access grafner dashboard so open your favorite browser and type ipr name so as you know the grafna uh port number is 3000 so for that you need your ip address so copy your ip address and copy the browser so paste in browser and the for graph now port number is three thousand three zero zero so you can see a loading graph now and you can see here you can see logging page of graph now and now you will have to log in with gilo graph now default username and password so your user default username and password is admin admin username admin and password also admin so you can say login page so username admin on password also admin so login now it's always good to change your login login credentials so now enter a new password so for more security and submit so you can see your graph now ui that means dashboard so you can say welcome to graph now so that means graph nice successfully installed on our ubuntu so it's done so the next is configure prometheus as grafner data source so for that firstly you need to click on the settings and configuration and then click on add data source and here select prometheus and now here you need to paste the url of your prometheus so copy the url and paste here and now after this so you can see as per your requirement you can do other changes or you can also keep remaining configuration as default so if you want to change then you can change so otherwise just keep it default and now click on save and test so you can see data source updated data source is working so it's done so the next step is now we are going to install uh node exporter so node exporter collectors the matrix of your systems mary uses cpus and ram disk ram disk space and etc so now to install node exporter so firstly you can see the official page of prometheus so you can see a node exporter so here you can see for linux so node exporter for linux so for windows the another exporter that with the name wmx porter so first we are going to install node exporter so click on right and copy the link address so for now firstly the first step of installing node exporter is you need to inside the slash dmp first so now clear the screen and then install node exporter with wk so you can see it's done so clear the screen so the next is unzip the downloaded with the tar command so run this command to unzip uh node exporter installer so yeah it's done so the next step is you can see a move the binaries files of node exporter to this location so run this command so yeah it's done so next create a node exporter user to run the node exporter service so for that run this command so copy the command and paste here so it's all done so now clear the screen now the next is create a node exporter service file in this directory so run this command and now we are going to add the lines means add some content in this directory so [Music] copy the content and paste in that particular directory so save the file and exit now let's start and enable the node exporter service using below command so firstly you need to reload the system then we are going to enable node exporter then we are going to start node exporter and now we are going to check the status of our node exporter so you can say active running that means is successfully installing our ubuntu so now it's done so now the next is now we have converted to how to install prometheus and graph now ubuntu with node exporter we have covered so the next is configure the node exporter as a prometheus target so for that now to scrap the node exporter so let's instruct the prometheus by making a minor changes in our roommates dot ymir file that means our configuration files so now we are going to add one more job in our configuration files so firstly we are going to command to open our configuration file firstly clear the screen first and then you can see uh here only uh right now you're only running only one for only one job now we are going to add one more job here with the name no exporter so copy and now we are going to paste here and now job name is not exporter and the host ip is our uh instance ip so copy instance ip and paste here now for node exporter port number is nine one double zero so you have to proper indentation so let's check first okay okay it's correct so now save the file and exit so the next is after changing in configuration file you need to restart to promote here so now we start our prometheus service okay it's done so now let's check in browser so for that copy your instance ip and you know your port number for node exporter nine one double zero so you can see porter matrix so you can see the matrix of node exporter that means it's successfully installed so now and if you go to the prometheus here and click on prometheus and go to the status and click on target so you can see here there are two jobs running not export sorry in target node exporter and prometheus and both stated up that means it's successfully installed and it's successfully added in configuration file so now it's done so the next is now the next step is you can see your import so now we are going to here you can see we are going to creating graphene dashboard to monitor linux server so now firstly you can see i in promethea here in graph network we click on go to the home page and here you can see the plus icon so click on import now we are going to creating monitored monitoring graph dashboard sorry linux so for that for linux you can see for linux so you can see so we will use 14513 to import graphnor.com so firstly we are going to import one four five one for linux so click on load and you can see namely linux exporter node and if you scroll down select prometheus as default and click on import so here you can see our linux expo linux dashboard so you can see monitoring linux server using graph grafna and prometheus so it's done so the next is so the next step is we are going to install wmi exporter on windows server windows operating system so for that here i have created windows instance so now we are going to connect our windows instance rdc click on connect paste the password so yes so here you can see i have already installed wmx porter so if you go to the you can see in my article uh you can see click on here so you can go to the release page and now here uh installed uh dot msi installer so now we are going to install wmx folder on windows so yeah it's installed so let's check so go to the service and here if you scroll down you can see a wmx exporter and the state is running that means it's successfully installed so let's check so copy the ip of windows uh instance and the port number is 91824 exporter so you can see the matrix of windows exporter so you can see the matrix of windows exporter that means it's successfully installed so now we are going to change uh configuration file that means we are going to add one more job in our prometeos configuration file so you can see in my article now we are going to configure the wmx folder as a prometheus target so for that run this command to open our prometheus configuration file so clear the screen now we are going to add one more job in our prometheus configuration file so clear the screen and now run the command firstly we need to inside the slash tmp okay so now we are going to add here one more job with the name wmx footer so copy and paste here and now we have the proper indentation in wmx portal and the ip of wm exporter means host ips so windows host ip so copy the host ip that means how is windows instance then the port number of wm exporter is 9182 so save the file so take the indentation is proper yes so save the file and exit so as you know after changing the in configuration file you need to restart our prometheus so for that we are going to restart our prometheus so yeah it's done so let's check the status of our prometheus so it's active running so let's check in target so go to the prometheus click on prometheus home page go to the now click on status and click on target so here you can see wmx portal so click on show more so you can see the state is up that means it's running so you can see in target there are three uh are running firstly not exporter wmx porter and then prometheus that means it's successfully installed uh in our ubuntu so now the next is we are going to so you can see next is creating graphene dashboard to monitor windows server so for that go to the graph now and here you can see firstly go to the sorry homepage and now click on plus icon so anything click on import and here for windows though your windows so you can see for windows the number is 14510 click on load then you can see the name windows exporter node so folder in general and if you scroll down the select prometheus as default and now click on import so now you can see windows export or not so that means monitoring windows server using prometheus and graph now so we can see the data so here you can see the windows server monitoring windows server using prometheus and grafner so yeah it's done so you can see that there you are done with the setup now your dashboard is running up so you can see so in this article sorry in this video uh we have learned how to monitor in linux and windows server using prometheus and graphna so thank you for watching our video i hope you like the video and it's helpful to you so please like share and subscribe our devops and channel
Info
Channel: DevOps Hint
Views: 10,470
Rating: undefined out of 5
Keywords: node exporter, Monitoring Linux and Windows using Prometheus and Grafana, Monitoring Linux and Windows using Prometheus and Grafana with Node Exporter and WMI Exporter, Monitoring Linux Server with Prometheus and Grafana, Monitoring Windows Server with Prometheus and Grafana, prometheus monitoring windows server, prometheus monitoring linux server, prometheus monitoring with grafana, prometheus node exporter grafana, prometheus monitoring demo, grafana prometheus dashboard tutorial
Id: jatcPHvChfI
Channel Id: undefined
Length: 39min 23sec (2363 seconds)
Published: Thu Dec 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.