Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
a03900ed
Commit
a03900ed
authored
Jun 29, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #131 from prometheus/docs-improvements
Docs improvements
parents
c90f206d
e23dcb64
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
28 deletions
+32
-28
faq.md
content/docs/introduction/faq.md
+6
-2
getting_started.md
content/docs/introduction/getting_started.md
+13
-18
storage.md
content/docs/operating/storage.md
+8
-1
rules.md
content/docs/querying/rules.md
+5
-7
No files found.
content/docs/introduction/faq.md
View file @
a03900ed
...
@@ -117,11 +117,15 @@ for the current state of this effort.
...
@@ -117,11 +117,15 @@ for the current state of this effort.
### Which languages have instrumentation libraries?
### Which languages have instrumentation libraries?
Currently, there are client libraries for:
Currently, there are
official
client libraries for:
*
[
Go
](
https://github.com/prometheus/client_golang
)
*
[
Go
](
https://github.com/prometheus/client_golang
)
*
[
Java
or Scala
](
https://github.com/prometheus/client_java
)
*
[
Java
(JVM)
](
https://github.com/prometheus/client_java
)
*
[
Ruby
](
https://github.com/prometheus/client_ruby
)
*
[
Ruby
](
https://github.com/prometheus/client_ruby
)
*
[
Python
](
https://github.com/prometheus/client_python
)
There are also a number of independently maintained client libraries. See the
[
client libraries
](
/docs/instrumenting/clientlibs/
)
documentation.
If you are interested in contributing a client library for a new language, see
If you are interested in contributing a client library for a new language, see
the
[
exposition formats
](
/docs/instrumenting/exposition_formats/
)
.
the
[
exposition formats
](
/docs/instrumenting/exposition_formats/
)
.
...
...
content/docs/introduction/getting_started.md
View file @
a03900ed
...
@@ -21,28 +21,23 @@ git clone https://github.com/prometheus/prometheus.git
...
@@ -21,28 +21,23 @@ git clone https://github.com/prometheus/prometheus.git
## Building Prometheus
## Building Prometheus
Building Prometheus currently still requires a
`make`
step, as some parts of
[
Download the latest release
](
https://github.com/prometheus/prometheus/releases
)
the source are autogenerated (web assets).
of Prometheus for your platform, then extract and run it:
```
language-bash
```
cd prometheus
tar xvfz prometheus-*.tar.gz
make build
./prometheus
```
```
Note that building requires a fair amount of memory. You should have
It should fail to start, complaining about the absence of a configuration file.
at least 2GiB of RAM available.
If you encounter problems building Prometheus, see
[
the more detailed build
instructions](https://github.com/prometheus/prometheus#use-make) in the
README.md.
## Configuring Prometheus to monitor itself
## Configuring Prometheus to monitor itself
Prometheus collects metrics from monitored targets by scraping metrics HTTP
Prometheus collects metrics from monitored targets by scraping metrics HTTP
endpoints on these targets. Since Prometheus also exposes data in the same
endpoints on these targets. Since Prometheus also exposes data in the same
manner about itself, it
may also be used t
o scrape and monitor its own health.
manner about itself, it
can als
o scrape and monitor its own health.
While a Prometheus server
which
collects only data about itself is not very
While a Prometheus server
that
collects only data about itself is not very
useful in practice, it is a good starting example. Save the following basic
useful in practice, it is a good starting example. Save the following basic
Prometheus configuration as a file named
`prometheus.yml`
:
Prometheus configuration as a file named
`prometheus.yml`
:
...
@@ -56,7 +51,7 @@ global:
...
@@ -56,7 +51,7 @@ global:
labels:
labels:
monitor: 'codelab-monitor'
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
# Here it's Prometheus itself.
scrape_configs:
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
...
@@ -86,11 +81,11 @@ Prometheus build directory and run:
...
@@ -86,11 +81,11 @@ Prometheus build directory and run:
```
```
Prometheus should start up and it should show a status page about itself at
Prometheus should start up and it should show a status page about itself at
http://localhost:9090. Give it a couple of seconds to
start collecting data
http://localhost:9090. Give it a couple of seconds to
collect data about itself
about itself
from its own HTTP metrics endpoint.
from its own HTTP metrics endpoint.
You can also verify that Prometheus is serving metrics about itself by
You can also verify that Prometheus is serving metrics about itself by
navigating to its metrics e
xposure e
ndpoint: http://localhost:9090/metrics
navigating to its metrics endpoint: http://localhost:9090/metrics
By default, Prometheus will only execute at most one OS thread at a
By default, Prometheus will only execute at most one OS thread at a
time. In production scenarios on multi-CPU machines, you will most
time. In production scenarios on multi-CPU machines, you will most
...
@@ -140,7 +135,7 @@ To count the number of returned time series, you could write:
...
@@ -140,7 +135,7 @@ To count the number of returned time series, you could write:
count(prometheus_target_interval_length_seconds)
count(prometheus_target_interval_length_seconds)
```
```
For
further details
about the expression language, see the
For
more
about the expression language, see the
[
expression language documentation
](
/docs/querying/basics/
)
.
[
expression language documentation
](
/docs/querying/basics/
)
.
## Using the graphing interface
## Using the graphing interface
...
...
content/docs/operating/storage.md
View file @
a03900ed
...
@@ -45,7 +45,7 @@ index via the following flags:
...
@@ -45,7 +45,7 @@ index via the following flags:
Prometheus stores its on-disk time series data under the directory
Prometheus stores its on-disk time series data under the directory
specified by the flag
`storage.local.path`
. The default path is
specified by the flag
`storage.local.path`
. The default path is
`
/tmp/metrics
`
, which is good to try something out quickly but most
`
./data
`
, which is good to try something out quickly but most
likely not what you want for actual operations. The flag
likely not what you want for actual operations. The flag
`storage.local.retention`
allows you to configure the retention time
`storage.local.retention`
allows you to configure the retention time
for samples. Adjust it to your needs and your available disk space.
for samples. Adjust it to your needs and your available disk space.
...
@@ -69,6 +69,13 @@ of thumb, keep it somewhere between 50% and 100% of the
...
@@ -69,6 +69,13 @@ of thumb, keep it somewhere between 50% and 100% of the
is larger checkpoints. The consequences of a value too low are much
is larger checkpoints. The consequences of a value too low are much
more serious.
more serious.
Out of the metrics that Prometheus exposes about itself, the following are
particularly useful for tuning the flags above:
*
`prometheus_local_storage_memory_series`
: The current number of series held in memory.
*
`prometheus_local_storage_memory_chunks`
: The current number of chunks held in memory.
*
`prometheus_local_storage_chunks_to_persist`
: The number of memory chunks that still need to be persisted to disk.
## Crash recovery
## Crash recovery
Prometheus saves chunks to disk as soon as possible after they are
Prometheus saves chunks to disk as soon as possible after they are
...
...
content/docs/querying/rules.md
View file @
a03900ed
...
@@ -17,14 +17,12 @@ process. The changes are only applied if all rule files are well-formatted.
...
@@ -17,14 +17,12 @@ process. The changes are only applied if all rule files are well-formatted.
## Syntax-checking rules
## Syntax-checking rules
To quickly check whether a rule file is syntactically correct without starting
To quickly check whether a rule file is syntactically correct without starting
a Prometheus server, install and run Prometheus's
`rule_checker`
tool:
a Prometheus server, install and run Prometheus's
`promtool`
command-line
utility tool:
```
bash
```
bash
# If $GOPATH/github.com/prometheus/prometheus already exists, update it first:
go get github.com/prometheus/prometheus/cmd/promtool
go get
-u
github.com/prometheus/prometheus
promtool check-rules /path/to/example.rules
go
install
github.com/prometheus/prometheus/tools/rule_checker
rule_checker /path/to/example.rules
```
```
When the file is syntactically valid, the checker prints a textual
When the file is syntactically valid, the checker prints a textual
...
@@ -54,7 +52,7 @@ Some examples:
...
@@ -54,7 +52,7 @@ Some examples:
job:http_inprogress_requests:sum = sum(http_inprogress_requests) by (job)
job:http_inprogress_requests:sum = sum(http_inprogress_requests) by (job)
# Drop or rewrite labels in the result time series:
# Drop or rewrite labels in the result time series:
new_time
series{label_to_change="new_value",label_to_drop=""} = old_time
series
new_time
_series{label_to_change="new_value",label_to_drop=""} = old_time_
series
Recording rules are evaluated at the interval specified by the
Recording rules are evaluated at the interval specified by the
`evaluation_interval`
field in the Prometheus configuration. During each
`evaluation_interval`
field in the Prometheus configuration. During each
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment