Professional Documents
Culture Documents
Prometheus Overview
Prometheus Overview
Prometheus
by Sujoy Kundu
● Most monitoring systems use a pushing mechanism where clients (applications /servers) are responsible
for pushing their metric data to a centralized collection platform (server). In contrast to a “push”
mechanic system, Prometheus is relying on targets (applications/servers) providing simple HTTP
endpoints that its data retrieval workers can pull/scrape from.
● Prometheus is a very powerful monitoring system, designed from the ground up to support and work
with dynamic environments. Prometheus has gained a reputation as the de facto monitoring software in
recent times. Its ease of use, versatility and literally endless integration options make it a favorite in the
monitoring and alerting world.
● https://prometheus.io/docs/introduction/overview/
Reference : https://grafana.com/blog/2022/03/21/how-relabeling-in-prometheus-works/
Scrape_Configs : Expose a metrics endpoint on your application server and let Prometheus know about
it. is providing a static target for your application server, as seen in the example below. This static
configuration approach mentioned below , where the metrics are collected on the specified endpoint.
● Labels :
Some earlier metric systems had only the metric name for distinguishing different metrics from
each other. This means that you might end up with metric names such as
bicycle.distance.meters.monark.7 to distinguish a 7-geared Monark bicycle from a 2-geared
Brompton bicycle (bicycle.distance.meters.brompton.2). In Prometheus, we use labels for that. A
label is written after the metric name in the format {label=value}.
Counter and Gauge are basic metric types, both of which store a scalar. A counter always counts up (a
reset to zero can happen on restart) compared to a gauge, which can go both up and down.
bicycle_distance_meters_total is a counter since the number of kilometers a bike has traveled cannot
decrease, whereas bicycle_speed_meters_per_second would have to be a gauge to allow for decreased
speeds.
Histogram and Summaries are used less , can be studies in
https://grafana.com/blog/2020/02/04/introduction-to-promql-the-prometheus-query-language/