Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The Prometheus monitoring system and time series database.

License

NotificationsYou must be signed in to change notification settings

prometheus/prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Prometheus
Prometheus

Visitprometheus.io for the full documentation,examples and guides.

CIDocker Repository on QuayDocker PullsGo Report CardCII Best PracticesOpenSSF ScorecardCLOMonitorGitpod ready-to-codeFuzzing Status

Prometheus, aCloud Native Computing Foundation project, is a systems and service monitoring system. It collects metricsfrom configured targets at given intervals, evaluates rule expressions,displays the results, and can trigger alerts when specified conditions are observed.

The features that distinguish Prometheus from other metrics and monitoring systems are:

  • Amulti-dimensional data model (time series defined by metric name and set of key/value dimensions)
  • PromQL, apowerful and flexible query language to leverage this dimensionality
  • No dependency on distributed storage;single server nodes are autonomous
  • An HTTPpull model for time series collection
  • Pushing time series is supported via an intermediary gateway for batch jobs
  • Targets are discovered viaservice discovery orstatic configuration
  • Multiple modes ofgraphing and dashboarding support
  • Support for hierarchical and horizontalfederation

Architecture overview

Architecture overview

Install

There are various ways of installing Prometheus.

Precompiled binaries

Precompiled binaries for released versions are available in thedownload sectiononprometheus.io. Using the latest production release binaryis the recommended way of installing Prometheus.See theInstallingchapter in the documentation for all the details.

Docker images

Docker images are available onQuay.io orDocker Hub.

You can launch a Prometheus container for trying it out with

docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus

Prometheus will now be reachable athttp://localhost:9090/.

Building from source

To build Prometheus from source code, You need:

  • Go: Version specified ingo.mod or greater.
  • NodeJS: Version specified in.nvmrc or greater.
  • npm: Version 8 or greater (check withnpm --version andhere).

Start by cloning the repository:

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

You can use thego tool to build and install theprometheusandpromtool binaries into yourGOPATH:

go install github.com/prometheus/prometheus/cmd/...prometheus --config.file=your_config.yml

However, when usinggo install to build Prometheus, Prometheus will expect to be able toread its web assets from local filesystem directories underweb/ui/static andweb/ui/templates. In order for these assets to be found, you will have to run Prometheusfrom the root of the cloned repository. Note also that these directories do not include theReact UI unless it has been built explicitly usingmake assets ormake build.

An example of the above configuration file can be foundhere.

You can also build usingmake build, which will compile in the web assets so thatPrometheus can be run from anywhere:

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

The Makefile provides several targets:

  • build: build theprometheus andpromtool binaries (includes building and compiling in web assets)
  • test: run the tests
  • test-short: run the short tests
  • format: format the source code
  • vet: check the source code for common errors
  • assets: build the React UI

Service discovery plugins

Prometheus is bundled with many service discovery plugins.When building Prometheus from source, you can edit theplugins.ymlfile to disable some service discoveries. The file is a yaml-formatted list of goimport path that will be built into the Prometheus binary.

After you have changed the file, youneed to runmake build again.

If you are using another method to compile Prometheus,make plugins willgenerate the plugins file accordingly.

If you add out-of-tree plugins, which we do not endorse at the moment,additional steps might be needed to adjust thego.mod andgo.sum files. Asalways, be extra careful when loading third party code.

Building the Docker image

You can build a docker image locally with the following commands:

make promupromu crossbuild -p linux/amd64make npm_licensesmake common-docker-amd64

Themake docker target is intended only for use in our CI system and will notproduce a fully working image when run locally.

Using Prometheus as a Go Library

Remote Write

We are publishing our Remote Write protobuf independently atbuf.build.

You can use that as a library:

go get buf.build/gen/go/prometheus/prometheus/protocolbuffers/go@latest

This is experimental.

Prometheus code base

In order to comply withgo mod rules,Prometheus release number do not exactly match Go module releases.

For thePrometheus v3.y.z releases, we are publishing equivalent v0.3y.z tags. The y in v0.3y.z is always padded to two digits, with a leading zero if needed.

Therefore, a user that would want to use Prometheus v3.0.0 as a library could do:

go get github.com/prometheus/prometheus@v0.300.0

For thePrometheus v2.y.z releases, we published the equivalent v0.y.z tags.

Therefore, a user that would want to use Prometheus v2.35.0 as a library could do:

go get github.com/prometheus/prometheus@v0.35.0

This solution makes it clear that we might break our internal Go APIs betweenminor user-facing releases, asbreaking changes are allowed in major versionzero.

React UI Development

For more information on building, running, and developing on the React-based UI, see the React app'sREADME.md.

More information

  • Godoc documentation is available viapkg.go.dev. Due to peculiarities of Go Modules, v3.y.z will be displayed as v0.3y.z (the y in v0.3y.z is always padded to two digits, with a leading zero if needed), while v2.y.z will be displayed as v0.y.z.
  • See theCommunity page for how to reach the Prometheus developers and users on various communication channels.

Contributing

Refer toCONTRIBUTING.md

License

Apache License 2.0, seeLICENSE.


[8]ページ先頭

©2009-2025 Movatter.jp