Tuesday, October 8, 2024

Prometheus Introduction

 



Prometheus:

Prometheus is an open-source toolkit written in Go that is designed to be a fully featured solution for monitoring and alerting.

Prometheus is responsible for collecting metrics data and storing it in an efficient time series database, while user is able to query that time-series data and configure alerting for real-time updates.

It actually will use the built-in database within it. We can transfer the data into external storage or keep within it.

It uses a multidimensional data model that accommodates time-series data. This data is associated with the timestamp and options key-value pairs.

Prometheus uses a HTTP pull model to retrieve stored time-series data.

Prometheus Components:

Prometheus server is a responsible for collecting a data from exporter or scraping a data from targeting machines and storing this data into time-series database.

Various client libraries are supported for programming languages including Rust, Python, Java, Ruby and Go. These libraries aid in instrumenting application mode.  Special exporters are also supported for exposing metrics from systems that cannot directly use Prometheus metrics such as Graphite, StatsD and other third parity software.

Alertmanager is used to handling alert within Prometheus.

Service discovery mechanisms such as Kubernetes native service discovery, DNS and file_sd are supported and discover  and begin monitoring new targets automatically.

The Push gateway is a separate component which used to collect metrics from short live which cannot be capurate by usual monitoring methods.

PromQL is an addition component used to provide a built-in expressive query language for querying and aggregating time-series data within Prometheus.

Prometheus pull a data from specfic targets through collecting metrics from http end points.  The main configuration file is prometheus.yml.  We can setup Prometheus to collect metrics on itself or pull a data and monitor own health.

PromQL expression are entered in the promethus expression browser [http://localhost:9090/graph]. We can enter any expression in order to render the result in a table or graph the result over time.

Exports are tools that help export metrics from third-parity system into Prometheus for consumption and aggregation.

Alert manager is efficient tool for collecting a alerts and manage it. It can able to redirect the notification to slack, PagerDuty, OpsGenie, Telegram, Microsoft Teams, WebEx, Discord and other receivers.






No comments:

Post a Comment