Prometheus
Tecnología

Prometheus

Metrics-based monitoring and alerting

Esta página de tecnología todavía no está disponible en tu idioma — se muestra la versión original.

Prometheus is an open-source monitoring system built around a time-series database and a pull-based metrics model. It scrapes metrics from configured targets at regular intervals, stores them, and lets you query and alert on them with its own query language, PromQL.

How it works

Prometheus periodically scrapes HTTP endpoints that expose metrics in its text-based exposure format — most applications and infrastructure components expose this natively or via an exporter. Scraped samples are stored in a local time-series database. PromQL queries that data for dashboards (commonly rendered in Grafana) and for alerting rules, which Prometheus evaluates continuously and forwards to Alertmanager when they fire.

Core concepts

  • Metric — a named, timestamped numeric measurement, optionally with key-value labels for dimensionality (e.g. http_requests_total{method="GET", status="200"}).
  • Target — an endpoint Prometheus scrapes for metrics, discovered statically or via service discovery (including native Kubernetes service discovery).
  • PromQL — Prometheus’ query language for selecting, aggregating, and computing over time-series data.
  • Alertmanager — a separate component that deduplicates, groups, and routes alerts fired by Prometheus’ alerting rules to email, Slack, PagerDuty, and other receivers.

Why teams adopt Prometheus

  • Kubernetes-native service discovery. It can automatically discover Pods, Services, and endpoints to scrape as your cluster changes.
  • A powerful query language. PromQL supports rich aggregation, rate calculations, and joins across metrics.
  • Dimensional metrics. Labels let you slice a single metric by any dimension you’ve instrumented, without predefining every combination.
  • The de facto standard. Most Kubernetes-native software — ingress controllers, service meshes, the components of Kubernetes itself — expose Prometheus-format metrics by default.

Getting started

Install Prometheus into your cluster (commonly via the kube-prometheus-stack Helm chart, which bundles Grafana and Alertmanager), configure it to discover the targets you want scraped, and write your first alerting rules. The guides below cover common scrape and alerting configurations.