-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add quickstart for prometheus. (#1562)
- Loading branch information
Showing
2 changed files
with
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
global: | ||
scrape_interval: 15s # By default, scrape targets every 15 seconds. | ||
|
||
external_labels: | ||
monitor: 'codelab-monitor' | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
|
||
scrape_interval: 5s | ||
|
||
static_configs: | ||
- targets: ['localhost:9090'] | ||
- job_name: 'hydra' | ||
|
||
# Override the global default and scrape targets from this job every 5 seconds. | ||
scrape_interval: 5s | ||
metrics_path: /metrics/prometheus | ||
static_configs: | ||
- targets: ['hydra:4445'] |
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,25 @@ | ||
########################################################################### | ||
####### FOR DEMONSTRATION PURPOSES ONLY ####### | ||
########################################################################### | ||
# # | ||
# If you have not yet read the tutorial, do so now: # | ||
# https://www.ory.sh/docs/hydra/5min-tutorial # | ||
# # | ||
# This set up is only for demonstration purposes. The login # | ||
# endpoint can only be used if you follow the steps in the tutorial. # | ||
# # | ||
########################################################################### | ||
|
||
version: '3' | ||
|
||
services: | ||
prometheus: | ||
image: prom/prometheus:v2.12.0 | ||
ports: | ||
- "9090:9090" | ||
depends_on: | ||
- hydra | ||
command: | ||
--config.file=/etc/prometheus/prometheus.yml | ||
volumes: | ||
- ./quickstart-prometheus-config.yml:/etc/prometheus/prometheus.yml |