prometheus

(★ 65,773)

The Prometheus monitoring system and time series database.

File Explorer

  • .dockerignore
  • .gitattributes
  • .gitignore
  • .golangci.yml
  • .promu.yml
  • .yamllint
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CODEOWNERS
  • CONTRIBUTING.md
  • Dockerfile
  • Dockerfile.distroless
  • go.mod
  • go.sum
  • go.work
  • LICENSE
  • MAINTAINERS.md
  • Makefile
  • Makefile.common
  • NOTICE
  • README.md
  • RELEASE.md
  • renovate.json
  • SECURITY-INSIGHTS.yml
  • SECURITY.md
  • VERSION

# Installation Guide

go
Prerequisites
  • Go Version specified in go.mod or greater
  • NodeJS Version specified in web/ui/.nvmrc or greater
  • npm 10 or greater

Setup Steps

git clone https://github.com/prometheus/prometheus.git

Clone the project source code.

cd prometheus

Change directory to the project folder.

make build

Build the project and compile web assets.

./prometheus --config.file=your_config.yml

Run Prometheus with the specified configuration file.

Key Commands

make build

Build prometheus and promtool binaries including web assets.

make test

Run the test suite for the project.

make assets

Build the React UI assets.

go install github.com/prometheus/prometheus/cmd/...

Install binaries into GOPATH.

When using go install, you must run Prometheus from the root of the cloned repository to read local web assets.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Release Timeline

Actively Maintained

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

docker run

View Details ▼

This command is an alias of `docker container run`.

tldr docker container run

View documentation for the original command:

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

go build

View Details ▼

Compile Go sources.

go build {{path/to/main.go}}

Compile a 'package main' file (output will be the filename without extension):

go build -o {{path/to/binary}} {{path/to/source.go}}

Compile, specifying the output filename:

go build -o {{path/to/binary}} {{path/to/package}}

Compile a package:

🔍

go get

View Details ▼

Add a dependency package, or download packages in legacy GOPATH mode.
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.

go get {{example.com/pkg}}

Add a specified package to `go.mod` in module-mode or install the package in GOPATH-mode:

go get {{example.com/pkg}}@{{v1.2.3}}

Modify the package with a given version in module-aware mode:

go get {{example.com/pkg}}@{{none}}

Remove a specified package:

🔍

go install

View Details ▼

Compile and install packages named by the import paths.

go install

Compile and install the current package:

go install {{path/to/package}}

Compile and install a specific local package:

go install {{golang.org/x/tools/gopls}}@{{latest}}

Install the latest version of a program, ignoring `go.mod` in the current directory:

🔍

npm

View Details ▼

JavaScript and Node.js package manager.
Manage Node.js projects and their module dependencies.
Some subcommands such as `install`, `run`, etc. have their own usage documentation.

npm init {{[-y|--yes]}}

Create a `package.json` file with default values (omit `--yes` to do it interactively):

npm {{[i|install]}}

Download all the packages listed as dependencies in `package.json`:

npm {{[i|install]}} {{package_name}}@{{version}}

Download a specific version of a package and add it to the list of dependencies in `package.json`:

🔍

promtool

View Details ▼

Tooling for the Prometheus monitoring system.

promtool check config {{config_file.yml}}

Check if the configuration files are valid or not (if present report errors):

promtool check rules {{rules_file.yml}}

Check if the rule files are valid or not (if present report errors):

curl --silent {{http://example.com:9090/metrics/}} | promtool check metrics

Pass Prometheus metrics over `stdin` to check them for consistency and correctness:

// repository documentation