-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3186 from hashicorp/f-prometheus-dashboard
Prometheus dashboard
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Prometheus Metrics | ||
|
||
This configuration file can be used to set up a Prometheus instance to read | ||
data from Nomad cluster, using Consul for service discovery. | ||
|
||
Requirements: | ||
- See Prometheus's | ||
[Getting Started](https://prometheus.io/docs/introduction/getting_started/) | ||
guide for instructions on how to set up a Prometheus server. | ||
- This configuration is written assuming there is a local Consul agent being | ||
run along side the Prometheus server. If this is not the case, the | ||
configuration will need to be updated to point at the remote Consul agent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
scrape_configs: | ||
- job_name: 'nomad_metrics' | ||
|
||
consul_sd_configs: | ||
- server: 'localhost:8500' | ||
services: ['nomad-client', 'nomad'] | ||
|
||
relabel_configs: | ||
- source_labels: ['__meta_consul_tags'] | ||
regex: '(.*)http(.*)' | ||
action: keep | ||
|
||
scrape_interval: 5s | ||
metrics_path: /v1/metrics | ||
params: | ||
format: ['prometheus'] |