mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
4456dcc26e
Signed-off-by: Bram Vogelaar <bram@attachmentgenie.com>
24 lines
743 B
YAML
24 lines
743 B
YAML
# An example scrape configuration for running Prometheus with
|
|
# Nomad build in service discovery.
|
|
#
|
|
# The following config can be used to monitor services running on
|
|
# a nomad that is started using the getting started tutorial [1]
|
|
#
|
|
# sudo nomad agent -dev -bind 0.0.0.0 -log-level INFO
|
|
#
|
|
# [1] https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started
|
|
|
|
scrape_configs:
|
|
# Make Prometheus scrape itself for metrics.
|
|
- job_name: "prometheus"
|
|
static_configs:
|
|
- targets: ["localhost:9090"]
|
|
|
|
# Discover Nomad services to scrape.
|
|
- job_name: 'nomad_sd'
|
|
nomad_sd_configs:
|
|
- server: 'http://localhost:4646'
|
|
relabel_configs:
|
|
- source_labels: [__meta_nomad_service]
|
|
target_label: job
|