Skip to content

Commit

Permalink
Grab metrics with Prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
jeckel committed Nov 8, 2023
1 parent fb8bdcd commit 326353d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .docker/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"

# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.

static_configs:
- targets: ["localhost:9090"]
- job_name: "demo"
metrics_path: "/"
static_configs:
- targets: ["demo:80"]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
image: bitnami/prometheus:latest
volumes:
- prometheus-data:/opt/bitnami/prometheus/data
- ./.docker/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml:ro
ports:
- "9090:9090"

Expand Down

0 comments on commit 326353d

Please sign in to comment.