mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge changes I76203973,I38646c2b
* changes: More updates for first time users. Update example config file from json to new protobuf format.
This commit is contained in:
commit
b70d5ca143
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -9,8 +9,13 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
*.rej
|
*.rej
|
||||||
*.so
|
*.so
|
||||||
|
|
||||||
|
# Editor files #
|
||||||
|
################
|
||||||
*~
|
*~
|
||||||
.*.swp
|
.*.swp
|
||||||
|
.*.swo
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
._*
|
._*
|
||||||
.nfs.*
|
.nfs.*
|
||||||
|
|
12
README.md
12
README.md
|
@ -39,6 +39,11 @@ For basic help how to get started:
|
||||||
For first time users, simply run the following:
|
For first time users, simply run the following:
|
||||||
|
|
||||||
$ make
|
$ make
|
||||||
|
$ ARGUMENTS="-configFile=documentation/examples/prometheus.conf" make run
|
||||||
|
|
||||||
|
``${ARGUMENTS}`` is passed verbatim into the makefile and thusly Prometheus as
|
||||||
|
``$(ARGUMENTS)``. This is useful for quick one-off invocations and smoke
|
||||||
|
testing.
|
||||||
|
|
||||||
If you run into problems, try the following:
|
If you run into problems, try the following:
|
||||||
|
|
||||||
|
@ -56,13 +61,6 @@ staticly link against C dependency libraries, so including the ``lib``
|
||||||
directory is paramount. Providing ``LD_LIBRARY_PATH`` or
|
directory is paramount. Providing ``LD_LIBRARY_PATH`` or
|
||||||
``DYLD_LIBRARY_PATH`` in a scaffolding shell script is advised.
|
``DYLD_LIBRARY_PATH`` in a scaffolding shell script is advised.
|
||||||
|
|
||||||
Executing the following target will start up Prometheus for lazy users:
|
|
||||||
|
|
||||||
$ ARGUMENTS="-foo -bar -baz" make run
|
|
||||||
|
|
||||||
``${ARGUMENTS}`` is passed verbatim into the makefile and thusly Prometheus as
|
|
||||||
``$(ARGUMENTS)``. This is useful for quick one-off invocations and smoke
|
|
||||||
testing.
|
|
||||||
|
|
||||||
### Problems
|
### Problems
|
||||||
If at any point you run into an error with the ``make`` build system in terms of
|
If at any point you run into an error with the ``make`` build system in terms of
|
||||||
|
|
|
@ -1,24 +1,30 @@
|
||||||
|
# Global default settings.
|
||||||
global {
|
global {
|
||||||
scrape_interval = "1s"
|
scrape_interval: "15s" # By default, scrape targets every 15 seconds.
|
||||||
evaluation_interval = "1s"
|
evaluation_interval: "15s" # By default, evaluate rules every 15 seconds.
|
||||||
labels {
|
|
||||||
monitor = "test"
|
|
||||||
}
|
|
||||||
rule_files = [
|
|
||||||
"prometheus.rules"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
job {
|
# Attach these extra labels to all timeseries collected by this Prometheus instance.
|
||||||
name = "prometheus"
|
labels: {
|
||||||
scrape_interval = "5s"
|
label: {
|
||||||
|
name: "monitor"
|
||||||
targets {
|
value: "codelab-monitor"
|
||||||
endpoints = [
|
|
||||||
"http://localhost:9090/metrics.json"
|
|
||||||
]
|
|
||||||
labels {
|
|
||||||
group = "canary"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Load and evaluate rules in this file every 'evaluation_interval' seconds. This field may be repeated.
|
||||||
|
#rule_file: "prometheus.rules"
|
||||||
|
}
|
||||||
|
|
||||||
|
# A job definition containing exactly one endpoint to scrape: Here it's prometheus itself.
|
||||||
|
job: {
|
||||||
|
# The job name is added as a label `job={job-name}` to any timeseries scraped from this job.
|
||||||
|
name: "prometheus"
|
||||||
|
# Override the global default and scrape targets from this job every 5 seconds.
|
||||||
|
scrape_interval: "5s"
|
||||||
|
|
||||||
|
# Let's define a group of targets to scrape for this job. In this case, only one.
|
||||||
|
target_group: {
|
||||||
|
# These endpoints are scraped via HTTP.
|
||||||
|
target: "http://localhost:9090/metrics.json"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue