prometheus/prometheus
Deployment
How Prometheus is built, packaged, and shipped. Operator-side deployment guidance is in documentation/examples/ and the user docs at https://prometheus.io/docs/; this page covers what the repository itself does.
Build artefacts
The release pipeline produces:
- Binaries:
prometheusandpromtoolforlinux/{amd64,arm64,386,armv7,armv6,ppc64le,s390x,riscv64},darwin/{amd64,arm64},windows/{amd64,386},freebsd/{amd64,386},openbsd/{amd64,386},netbsd/{amd64,386}, anddragonfly/amd64. See.promu.ymlfor the matrix. - Tarballs: one per OS/arch, named
prometheus-<version>.<os>-<arch>.tar.gz, plus a separateprometheus-web-ui-<version>.tar.gzcontaining prebuilt UI assets so users can build slim binaries from source. - Docker images: two variants:
prom/prometheus:<version>-busybox— the long-standing busybox-based image, default tag:<version>.prom/prometheus:<version>-distroless— newer (3.10) distroless variant, UID/GID 65532, noVOLUMEdeclaration.
- Container repos:
quay.io/prometheus/prometheusanddocker.io/prom/prometheus.
The matching prom/promtool and quay.io/prometheus/promtool images carry the CLI.
Build pipeline
The release pipeline runs in CI (.github/workflows/ci.yml) on tags v*. Highlights:
make assets— build the UI.make assets-tarball— packageprometheus-web-ui-<version>.tar.gz.make npm_licenses— bundle license files for npm dependencies.make assets-compress— gzip the embedded UI assets.promu crossbuild— produce per-platform binaries.make docker— build container images.- Publish artefacts to GitHub Releases, Docker Hub, and Quay.
The prometheus/promu build helper is what produces reproducible binaries; flags and tags are set in .promu.yml.
Docker
Two Dockerfiles:
Dockerfile— the busybox-based image. Defaultprom/prometheus:latest.Dockerfile.distroless— distroless variant.prom/prometheus:latest-distroless.
The 3.10 release introduced the distroless variant alongside the busybox image. Migrating named volumes from busybox to distroless requires chown -R 65532:65532 /prometheus on the volume — the busybox image used nobody/nogroup, the distroless one uses nonroot (65532:65532).
docker run --rm -v prometheus-data:/prometheus alpine \
chown -R 65532:65532 /prometheus
docker run -v prometheus-data:/prometheus prom/prometheus:latest-distrolessPlatform-specific build tags
.promu.yml sets these tags by default in release builds:
netgo— pure-Go DNS resolver. Avoids glibc nss linkage in the binary.osusergo— pure-Go user/group lookup.builtinassets— embed UI assets into the binary.
Users building from source can override these. The README's "Service discovery plugins" section shows how to slim binaries with remove_all_sd plus enable_<name>_sd.
Release cadence
A minor release every six weeks; coordinated by the rotating release-coordinator role (see MAINTAINERS.md::v3 release coordinators). Process documented in RELEASE.md. A typical cycle:
- Cut RC (week 5 of cycle): tag
v3.x.0-rc.0, freeze therelease-3.xbranch. - Bake-off: 1–2 weeks of testing, with bug-fix commits cherry-picked to the release branch.
- Cut final: tag
v3.x.0, build artefacts, publish. - Patch releases: cherry-picks for security and severe bugs become
v3.x.yover the release-branch's lifetime.
Each user-visible major has a paired internal v0.3xx.y tag for go get users — the README explains the mapping.
Configuration files in the repo
Dockerfile,Dockerfile.distroless— image builds..promu.yml— promu build matrix and flags.Makefile,Makefile.common— build targets (the latter is shared acrossprometheus/*repos).documentation/examples/prometheus.yml— example config used bymake build's smoke test.
Health checks
For container orchestrators:
- Liveness:
GET /-/healthy— returns 200 while the process is responsive. - Readiness:
GET /-/ready— returns 200 only after WAL replay completes. Returns theX-Prometheus-Stoppingheader during graceful shutdown so load balancers can drain (3.10 fix#17795).
Resource sizing
Operator guidance lives in documentation/storage.md and the user docs. Rule of thumb:
- Memory: ~1.5 GB per million active series for a 24h retention.
- Disk: ~1.5 bytes per sample, post-compaction.
- CPU: scales with scrape rate and PromQL query complexity.
Federation, HA, and replication
Prometheus has no built-in clustering. Common patterns:
- HA pairs — two identical Prometheus instances scraping the same targets, ideally with
external_labels.replicato differentiate. - Federation — central Prometheus federates aggregated series from leaf instances via
/federate. - Remote storage — ship samples to Mimir / Cortex / Thanos / etc. via remote write for long-term storage and global views.
Monitoring Prometheus
Prometheus exposes its self-metrics on /metrics. The Jsonnet "mixin" under documentation/prometheus-mixin/ is the canonical alerts + dashboards bundle for self-monitoring; it is published as a prometheus-mixin tarball.
See How to monitor for what to watch and Security for hardening.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.