Inferensys

Glossary

Prometheus

An open-source systems monitoring and alerting toolkit that scrapes and stores time-series metrics from instrumented targets, serving as the de facto standard for Kubernetes cluster observability.
SRE continuously monitoring AI systems on multiple screens, real-time dashboards visible, dark mode NOC setup.
OPEN-SOURCE MONITORING

What is Prometheus?

Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud, now a graduated project of the Cloud Native Computing Foundation. It scrapes and stores time-series metrics from instrumented targets, serving as the de facto standard for Kubernetes cluster observability.

Prometheus is a pull-based monitoring system that collects metrics as time-series data identified by metric name and key-value pairs. It discovers targets via service discovery or static configuration, scrapes HTTP endpoints at regular intervals, and stores the results in a local, custom time-series database optimized for high-dimensional data. The PromQL query language enables complex aggregation and analysis of this data.

The architecture is fundamentally single-node and autonomous, designed for reliability without external dependencies. For long-term storage and global aggregation, it integrates with remote storage adapters like Thanos or Cortex. Alerting is handled by the Alertmanager, which deduplicates, groups, and routes notifications to receivers like PagerDuty or Slack based on rules evaluated by the Prometheus server.

ARCHITECTURAL COMPONENTS

Key Features of Prometheus

Prometheus defines the standard for cloud-native observability through a pull-based architecture and a purpose-built time-series database, optimized for dynamic Kubernetes environments.

01

Pull-Based Metric Collection

Prometheus actively scrapes metrics from instrumented targets at defined intervals, rather than passively receiving pushes. This model simplifies service discovery in Kubernetes, where the server reaches out to ephemeral pod endpoints directly. Each scrape pulls a text-based snapshot of the target's current state over HTTP, typically from a /metrics endpoint. This architecture inherently provides a health check: a failed scrape immediately signals an unavailable service. It also centralizes collection control, allowing operators to manage scrape intervals, timeouts, and TLS settings from the server side without modifying applications.

Pull-based
Collection Model
02

PromQL: The Query Language

PromQL (Prometheus Query Language) is a functional, read-only language designed specifically for selecting and aggregating time-series data. It enables complex calculations directly within the database, such as computing the 99th percentile latency over a sliding window or the rate of HTTP errors per second. Key capabilities include:

  • Instant vector selectors for current value snapshots
  • Range vector selectors with functions like rate() and increase() for counter data
  • Aggregation operators (sum, avg, topk) that can group by arbitrary Kubernetes labels like namespace or pod
  • Binary arithmetic between metrics for calculating ratios and deltas This expressive language allows SREs to define precise alerting rules and build dynamic dashboards without pre-processing data.
03

Dimensional Data Model

Prometheus stores every time series with a metric name and a set of arbitrary key-value pairs called labels. This multi-dimensional model is fundamentally aligned with Kubernetes' own labeling system. A metric like http_requests_total can be tagged with {method="POST", handler="/api", status="200"}. This allows for dynamic aggregation: you can instantly query the total request rate across all handlers or drill down to a single endpoint's error rate. Labels provide the flexibility to slice and dice operational data without pre-defining hierarchies, making it trivial to pivot from cluster-wide views to individual pod performance.

04

Standalone TSDB Storage

The Prometheus server includes a custom time-series database (TSDB) that operates on local storage, requiring no external database cluster. It uses a write-ahead log (WAL) for crash resilience and a two-hour head block in memory for recent data before compacting it into immutable, compressed blocks on disk. This design delivers high write throughput for millions of active series while maintaining efficient query performance. The local, self-contained storage model is critical for air-gapped and disconnected environments, as it eliminates dependencies on external network-attached storage or distributed consensus systems, ensuring the monitoring stack remains fully operational in isolation.

Millions
Active Series per Server
05

Alertmanager Integration

Prometheus fires alerts by evaluating PromQL expressions against configured thresholds, but it delegates notification management to Alertmanager, a separate component. Alertmanager handles deduplication, grouping, and routing of alerts to receivers like PagerDuty, Slack, or email. It can inhibit certain alerts if a higher-priority alert is already firing—for example, suppressing individual pod alerts when a node-wide failure is detected. This separation of concerns keeps the core monitoring server focused on data collection and rule evaluation, while Alertmanager manages the complex logic of escalation policies and on-call rotations.

06

Service Discovery for Kubernetes

Prometheus natively integrates with the Kubernetes API to dynamically discover scrape targets. It watches for changes to Pods, Endpoints, Services, and Ingresses, automatically updating its target list as workloads scale or reschedule. Configuration is driven by relabeling rules that map Kubernetes metadata—like pod annotations (prometheus.io/scrape: "true") or namespace labels—into Prometheus target labels. This eliminates manual target configuration and ensures that monitoring adapts instantly to the ephemeral nature of containerized AI workloads, such as a new GPU-accelerated inference pod coming online.

PROMETHEUS MONITORING

Frequently Asked Questions

Clear, technically precise answers to the most common questions about operating Prometheus for AI workloads in disconnected and air-gapped Kubernetes environments.

Prometheus is an open-source systems monitoring and alerting toolkit that scrapes and stores time-series metrics from instrumented targets. It operates on a pull-based model: the Prometheus server periodically fetches metrics over HTTP from instrumented services, applications, and infrastructure components. Each target exposes a /metrics endpoint in a simple text-based exposition format. The server then stores these scraped samples as key-value pairs with millisecond-precision timestamps in a custom time-series database on local storage. The core query language, PromQL, enables operators to slice, aggregate, and transform this data for visualization in dashboards like Grafana or to trigger alerts via the Alertmanager component. Unlike push-based systems, this architecture provides inherent service discovery integration, allowing Prometheus to dynamically discover targets in ephemeral environments like Kubernetes without manual configuration changes.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.