Giter Site home page Giter Site logo

prometheus / docs Goto Github PK

View Code? Open in Web Editor NEW
632.0 632.0 989.0 23.22 MB

Prometheus documentation: content and static site generator

Home Page: https://prometheus.io

License: Apache License 2.0

Ruby 11.34% HTML 17.22% JavaScript 4.63% CSS 4.88% Makefile 0.48% Dockerfile 0.11% Less 30.47% SCSS 30.86%
documentation hacktoberfest prometheus prometheus-documentation

docs's Introduction

Prometheus
Prometheus

Visit prometheus.io for the full documentation, examples and guides.

CI Docker Repository on Quay Docker Pulls Go Report Card CII Best Practices Gitpod ready-to-code Fuzzing Status OpenSSF Scorecard

Prometheus, a Cloud Native Computing Foundation project, is a systems and service monitoring system. It collects metrics from 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:

  • A multi-dimensional data model (time series defined by metric name and set of key/value dimensions)
  • PromQL, a powerful and flexible query language to leverage this dimensionality
  • No dependency on distributed storage; single server nodes are autonomous
  • An HTTP pull model for time series collection
  • Pushing time series is supported via an intermediary gateway for batch jobs
  • Targets are discovered via service discovery or static configuration
  • Multiple modes of graphing and dashboarding support
  • Support for hierarchical and horizontal federation

Architecture overview

Architecture overview

Install

There are various ways of installing Prometheus.

Precompiled binaries

Precompiled binaries for released versions are available in the download section on prometheus.io. Using the latest production release binary is the recommended way of installing Prometheus. See the Installing chapter in the documentation for all the details.

Docker images

Docker images are available on Quay.io or Docker 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 at http://localhost:9090/.

Building from source

To build Prometheus from source code, You need:

Start by cloning the repository:

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

You can use the go tool to build and install the prometheus and promtool binaries into your GOPATH:

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

However, when using go install to build Prometheus, Prometheus will expect to be able to read its web assets from local filesystem directories under web/ui/static and web/ui/templates. In order for these assets to be found, you will have to run Prometheus from the root of the cloned repository. Note also that these directories do not include the React UI unless it has been built explicitly using make assets or make build.

An example of the above configuration file can be found here.

You can also build using make build, which will compile in the web assets so that Prometheus can be run from anywhere:

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

The Makefile provides several targets:

  • build: build the prometheus and promtool 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 the plugins.yml file to disable some service discoveries. The file is a yaml-formated list of go import path that will be built into the Prometheus binary.

After you have changed the file, you need to run make build again.

If you are using another method to compile Prometheus, make plugins will generate 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 the go.mod and go.sum files. As always, be extra careful when loading third party code.

Building the Docker image

The make docker target is designed for use in our CI system. You can build a docker image locally with the following commands:

make promu
promu crossbuild -p linux/amd64
make npm_licenses
make common-docker-amd64

Using Prometheus as a Go Library

Remote Write

We are publishing our Remote Write protobuf independently at buf.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 with go mod rules, Prometheus release number do not exactly match Go module releases. For the Prometheus v2.y.z releases, we are publishing 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/[email protected]

This solution makes it clear that we might break our internal Go APIs between minor user-facing releases, as breaking changes are allowed in major version zero.

React UI Development

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

More information

  • Godoc documentation is available via pkg.go.dev. Due to peculiarities of Go Modules, v2.x.y will be displayed as v0.x.y.
  • See the Community page for how to reach the Prometheus developers and users on various communication channels.

Contributing

Refer to CONTRIBUTING.md

License

Apache License 2.0, see LICENSE.

docs's People

Contributors

beorn7 avatar brancz avatar brian-brazil avatar bwplotka avatar cherti avatar codesome avatar dependabot[bot] avatar discordianfish avatar fabxc avatar gouthamve avatar grobie avatar jamtur01 avatar jimmidyson avatar josedonizetti avatar juliusv avatar lucperkins avatar mdlayher avatar metalmatze avatar mmoya avatar mxinden avatar richih avatar roidelapluie avatar sdurrheimer avatar simonpasquier avatar stapelberg avatar stuartnelson3 avatar superq avatar tomwilkie avatar vonneudeck avatar yolossn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Document clean shutdown beyond the FAQ

Currently we only mention in the FAQ that a clean requires sigterm or , that should be in the general docs too and also the http endpoint.

Hmm, should we mention that in the crash recovery error message?

Docs: Getting Started: GOPATH and mercurial

Following the getting started tutorial, where one runs the example processes.
You could add people need to set up their GOPATH for go get -d and go build to work.

# Fetch the client library code and compile example.
git clone https://github.com/prometheus/client_golang.git
cd client_golang
export GOPATH=$(pwd)
cd examples/random
go get -d
go build

Also, when doing go get -d I got an error for Mercurial not being installed:

$ go get -d
go: missing Mercurial command. See https://golang.org/s/gogetcmd
package bitbucket.org/ww/goautoneg: exec: "hg": executable file not found in $PATH

Might be worth mentioning.

Prometheus won't read file_sd_config

When I try to load a file_sd_config file, I get no error, but prometheus doesn't show any of those hosts on the status page as candidate for scraping, no matter how long I wait. Nothing is logged, even with -log.level=debug, and promtool doesn't check that file.

included file:

targets:
  - host1.example.com:9103
  - host2.example.com:9103
  - host3.example.com:9103
  - host4.example.com:9103
  - host5.example.com:9103
labels:
  - job: zookeeper

I'm using this prometheus:

prometheus, version 0.15.0rc3 (branch: master, revision: d437fce)
  build user:       [email protected]
  build date:       20150720-16:25:16
  go version:       1.4.2

Add a glossary

We've lots of terms, and I expect some of them (like bridge vs. collector vs exporter) are only in a few people's heads. We should have a glossary.

Docs: Getting Started: Expression Browser

Go to the expression browser and verify that Prometheus now has information about time series that these example endpoints expose, such as the rpc_durations_microseconds metric.

If the "expression browser" is located under the "Graph" tab, adding the 3 random servers only provides

  • scrape_duration_seconds
  • up

rpc_durations_microseconds is available on the respective metrics endpoints of the random services. It does not show up in the dropdown next to the blue "Execute" button.

Update comparison section

From jaredwiltshire via prometheus-developers:

"The InfluxDB comparison highlights that Prometheus uses much less disk space than Prometheus due to its data storage model. However this seems to no longer be the case - https://influxdb.com/blog/2015/10/07/the_new_influxdb_storage_engine_a_time_structured_merge_tree.html
It also references a Github issue for InfluxDB regarding indexing which has since been closed."

I also believe we might want to include a few other monitoring and event-logging systems.

Reword to let newcomers work with a release, not with HEAD.

If doing everything from 'getting started' page, one will find out that config is wrong:

marko@marko-desktop:~/tmp/prometheus (master) $ ./prometheus -config.file=prometheus.conf
prometheus, version 0.13.3 (branch: master, revision: 572b280)
  build user:       marko@marko-desktop
  build date:       20150520-18:45:13
  go version:       1.4.2
E0520 18:56:16.629990   18370 main.go:224] Couldn't load configuration (-config.file=prometheus.conf): yaml: line 3: did not find expected ',' or '}'
E0520 18:56:16.630068   18370 main.go:225] Note: The configuration format has changed with version 0.14, please check the documentation.

Set html page title

The HTML page title currently always says "Prometheus". This isn't helpful for SEO and search reasons. Add the title of each page to the html title attribute, something like $page | Prometheus e.g. Getting started | Prometheus.

Provide RSS feed for blog posts

It's awesome that we have a blog now, but it's not possible to subscribe to updates. While RSS/atom is not super popular anymore, it would be nice to provide a feed so that people can use tools to get notified immediately about new blog posts.

Add non-goals

Perhaps next to the road map, add a "non-road-map" with the non-goals, i.e. things that sound like nice features but which we do not intend to implement for reasons to be stated in the new section.

Ideas so far:

  • Rule templating language.
  • Strings as sample values (and neither ints...).
  • Support event logging / become a log db.

More?

Can't click left side menu when browser too small

If I resize the browser until the content gets pushed down below the side menu, I can't click the links on the left side menu (#col-md-3) anymore. Setting z-index:100 fixes that but not sure where to put that and if there is a cleaner way.

What is a Prometheus Domain?

On the metrics naming docs it references a "Prometheus Domain". However, I can't find any more docs on this. I just want some clarity that the naming of the etcd metrics are alright; for example should these be prefixed with etcd_?

  • rafthttp_message_sent_latency_microseconds
  • rafthttp_message_sent_failed_total

Document `__tmp_` prefix.

We should document that if anyone needs temporary labels, they should use the __tmp_ prefix to ensure that their temporary label name will never conflict with any existing labels.

Document branches and publishing for the docs site properly.

We need to clearly document at various places that prometheus.io is based on HEAD and represents the latest releases of the various other repos, while unreleased features (in the HEAD of the various repos) are in the next-release branch of docs.

Currently, we document something completely wrong on http://prometheus.io/docs/introduction/install/ :
"Note that this documentation (as published on prometheus.io) refers to the latest production release. The head of the prometheus/docs GitHub repository refers to the (possibly not yet released) head of the prometheus/prometheus (and other) repositories."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.