Connect with us

Hi, what are you looking for?

DevOps

Prometheus Monitoring Tool : Introduction and Architecture

In this tutorial we’re learning about Prometheus Introduction and Architecture. Prometheus is a great DevOps Monitoring Tool. We’re going to go through Prometheus architecture. So different components that it contains and also some of these key characteristics. It became so widely accepted and popular especially in containerized environment.

Prometheus Introduction

Especially in containerized environments. The Prometheus was created to monitor highly dynamic container environments like Kubernetes docker swarm etc.

However it can also be used in a traditional non container infrastructure. Where you have just bare-metal servers with applications deployed directly on them. So over the past years Prometheus has become the mainstream monitoring tool of choice in container and micro service world.

Prometheus Architecture

Prometheus offers such automated monitoring and alerting. Is exactly what as a part of a modern DevOps workflow So how does Prometheus actually work or how does it architecture actually looks like and its core the block diagram is given below:

Advertisement. Scroll to continue reading.

Prometheus Server

Prometheus has the main component called Prometheus server. That does the actual monitoring work and is made up of three parts:

  1. Time series database
  2. Data retrieval worker
  3. Accepts PromQL Queries

1. Time series database

It has a time series database that stores all the metrics data like current CPU usage or a number of exceptions in an application .

2. Data retrieval worker

It has a data retrieval worker that is responsible for getting or pulling those metrics from applications services servers. Other target resources and storing them and pushing them into that database.

3. Accepts PromQL Queries

It has a web server or server API that accepts queries for that stored data. That web server component or the server API is used to display the data in a dashboard or UI either through Prometheus dashboard. Some other data visualization tool like graph Anna.

Targets

The Prometheus server monitors Linux server or Windows Server it could be a standalone server a single application or service like database. That Prometheus monitors are called targets.

Advertisement. Scroll to continue reading.

Each target has units of monitoring for Linux server target it could be current CPU status its memory usage disk space usage etc.

For an application for example it could be a number of exceptions number of requests or request duration. That unit that you would like to monitor for a specific target is called a metric. Metrics are what gets saved into Prometheus database component.

Metrics

Prometheus defines human readable text based format for these metrics metrics entries or data has type. Help attributes to increase its readability so help is basically a description.

Just describe what the metrics is about and type is one of three metrics types for metrics about. How many times something happened like number of exceptions that application had.

Advertisement. Scroll to continue reading.

Number of requests it has received there is a counter type metric that can go both up and down is represented by a example.

What is the current value of CPU usage now or what is the current capacity of disk space now. What is the number of concurrent requests at that given moment. For tracking how long something took or how big for example the size of a request was there is a histogram type.

Target Endpoints

So now the interesting question is how does Prometheus actually collect those metrics from the targets. Prometheus pulls metrics data from the targets from an HTTP endpoint. Which by default is host address slash metrics and for that to work one targets must expose that slash metrics endpoint. Two data available at slash metrics endpoint must be in the format that Prometheus understands.

You don’t need extra work to gather metrics from them but many services. Don’t have native Prometheus endpoints so extra component is required to do that.

Advertisement. Scroll to continue reading.

Exporter

This component is exporter so exporter is basically a script or service. That fetches metrics from your target and converts them in format. It understands and exposes this converted data at its own slash metrics endpoint.

It has a list of exporters for different services like MYSQL, Elasticsearch, Linux server built tools cloud platforms.

Conclusion : Finally, you have learning about Prometheus Introduction and Architecture. If you have any query about this topic you can use the comment section below.

Advertisement. Scroll to continue reading.
Comments
Advertisement
Advertisement
Advertisement

You May Also Like

Windows

How to auto upgrade JioFi firmware for JioFi 2 / JioFi 3 / JioFi 4 / JioFi 5 / JioFi 6 and other JioFi...

Windows

Internet is the most important public network for connecting to the WEB. For internet connection requirement the ISP is required as well as it...

Windows

How to download and install the Mobile Intel 4 Series Express Chipset Graphics Drivers for Windows 10.  Windows 10 is the one of the...

Windows

How to Install and Configure PCSX2 on Windows 10. The Windows 10 is the most recommended operating system for the Games. In stream platform...