P rometheus is an open-source tool for metrics collection. It collects the metrics from static or dynamic environment and stores in a time series database.
Prometheus is pull-based system. it sends an HTTP request, a so-called scrape, based on the configuration defined in the prometheus.yml file discussed below. The response to this scrape request is stored and parsed in the storage along with the metrics for the scrape itself.
AWS Account with the running AWS EC2-Ubuntu-18 machine.
Now, we will discuss the core components of AWS services:
We are going to pull Prometheus image from docker.hub. Lets create the configuration file for Prometheus at “/root/prometheus.yml”.
There are two targets for the Prometheus server. First is your localhost and second is your Ubuntu machine public IP.
The image to be pulled is prom/prometheus from docker.hub and the Prometheus server will run on port number 9090, that is binded to your Ubuntu machine port 9090.
Select your running Ubuntu machine go to the security group->edit inbound rules->Add Rule. Allow the following ports as shown below.
Open your browser and type- http://188.8.131.52:9090/targets
Node Exporter is a Prometheus exporter for hardware and OS metrics with plug-able metric collectors. It allows to measure various machine resources such as memory, disk and CPU utilization.
Open the the browser and hit the same url you hit above http://184.108.40.206:9090/targets
Thank you so much for reading, I have tried it to explain this with some live example. Hope you like it see you again in next topic.
Awesome! we did it. We didthe whole setup with some easy steps.Thanks for reading. Please write the response if we can do it in better way.