Skip to content

Commit

Permalink
Add quickstart for prometheus. (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
genchilu authored and aeneasr committed Sep 16, 2019
1 parent f834907 commit 2728b36
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
20 changes: 20 additions & 0 deletions quickstart-prometheus-config.yml
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']
25 changes: 25 additions & 0 deletions quickstart-prometheus.yml
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

0 comments on commit 2728b36

Please sign in to comment.