Commit d95c6cb8 authored by Fabian Reinartz's avatar Fabian Reinartz

Merge pull request #134 from prometheus/fix-yaml-example

Add back Prometheus target to last config example.
parents 1b1a7c4a 2236375a
...@@ -188,8 +188,8 @@ endpoints to a single job, adding extra labels to each group of targets. In ...@@ -188,8 +188,8 @@ endpoints to a single job, adding extra labels to each group of targets. In
this example, we will add the `group="production"` label to the first group of this example, we will add the `group="production"` label to the first group of
targets, while adding `group="canary"` to the second. targets, while adding `group="canary"` to the second.
To achieve this, add the following job definition to your `prometheus.yml` and To achieve this, add the following job definition to the `scrape_configs`
restart your Prometheus instance: section in your `prometheus.yml` and restart your Prometheus instance:
``` ```
scrape_configs: scrape_configs:
...@@ -257,6 +257,15 @@ rule_files: ...@@ -257,6 +257,15 @@ rule_files:
- 'prometheus.rules' - 'prometheus.rules'
scrape_configs: scrape_configs:
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
scrape_timeout: 10s
target_groups:
- targets: ['localhost:9090']
- job_name: 'example-random' - job_name: 'example-random'
scrape_interval: 5s scrape_interval: 5s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment