OpenSourcePicks

Open source alternatives to popular software, with live GitHub data

GitHub stats refreshed every day

Prometheus

Metrics collection, time series storage, PromQL queries and alerting rules in one CNCF server

Visit PrometheusGitHubDocumentation

Main features

  • Multi-dimensional time series model with labels
  • PromQL query language
  • Pull-based scraping with service discovery for Kubernetes and clouds
  • Pushgateway for batch and short-lived jobs
  • Recording and alerting rules
  • Alertmanager for grouping, silencing, inhibition and routing of alerts
  • Opt-in OTLP metrics receiver
  • Remote read and write to long-term storage
  • Federation between servers
  • Built-in expression browser and graphs
  • Exporters for hosts, databases, proxies and endpoint probing

What Prometheus does

Prometheus is a metrics system. The server scrapes numeric measurements from targets over HTTP at fixed intervals, stores them as time series identified by a metric name and a set of labels, and lets you query them with PromQL. Rules written in the same language can pre-compute aggregates or fire alerts. It began at SoundCloud in 2012 and joined the Cloud Native Computing Foundation in 2016 as its second project after Kubernetes, and it is governed independently of any company.

It is best understood as the core of a monitoring stack rather than a finished product. Targets expose metrics either natively, through client libraries in your code, or through exporters: node_exporter for Linux hosts, exporters for databases and proxies, and blackbox_exporter for probing endpoints over HTTP(S), DNS, TCP, ICMP and gRPC, which is how Prometheus users do uptime checks. Alerts go to Alertmanager, a separate component that deduplicates and groups them, applies silences and inhibition rules, and routes notifications to email, PagerDuty, Opsgenie, webhooks and other receivers. For dashboards the project itself recommends Grafana; the built-in web interface is meant for ad hoc queries and graphs.

Data collection and storage

The pull model is a deliberate choice: the project argues it makes it easier to tell whether a target is down and to run an extra Prometheus on a laptop for testing. Short-lived jobs can push through the Pushgateway, and an OTLP receiver accepts OpenTelemetry metrics once you enable it with a flag. Service discovery finds targets in Kubernetes, cloud providers and other sources automatically.

Data is kept in a local time series database. By default samples are deleted after 15 days; you can set retention by time or by disk size. The documentation is direct about the trade-off: local storage is not clustered or replicated, so it should be treated like a single-node database. For long-term or durable storage, Prometheus can send data to external systems through remote write. High availability means running two identical servers, with Thanos or a remote-write backend deduplicating the data and clustered Alertmanagers deduplicating alerts.

Self-hosting Prometheus

The server is one Go binary with no external dependencies, available as precompiled downloads and as Docker images on Quay.io and Docker Hub. Configuration is a YAML file listing scrape jobs and rule files. TLS and client-certificate authentication are supported, but the receivers that accept pushed data (OTLP and remote write) are off by default because Prometheus can run without authentication. The documentation recommends snapshots for consistent backups.

Hosted version

The Prometheus project does not run a hosted service. Several companies offer Prometheus-compatible managed services, but they are separate products with their own terms.

Limitations

Prometheus handles metrics only. The FAQ advises against putting logs into it and points to Loki or OpenSearch, and it has no tracing or application performance monitoring. The project also says it is not suitable for data that must be 100% accurate, such as per-request billing. Building a complete setup means choosing and running exporters, Alertmanager, Grafana and possibly long-term storage, which takes more work than an all-in-one product.

Who it suits

Prometheus suits teams running Kubernetes or many services who want a standard, vendor-neutral metrics backbone and are comfortable assembling components. If you want metrics, logs and traces in one installed product, look at SigNoz, OpenObserve or Coroot, several of which accept Prometheus data.

Technical details

Self-hosting needs

  • Local disk storage

Built with

  • Go
  • React

GitHub topics

  • alerting
  • graphing
  • hacktoberfest
  • metrics
  • monitoring
  • prometheus
  • time-series

Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.