Skip to content

Commit 866ea7f

Browse files
committed
added prometheus docker block
1 parent d9d3da4 commit 866ea7f

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

docker/blocks/prometheus/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM prom/prometheus
2+
ADD prometheus.yml /etc/prometheus/

docker/blocks/prometheus/fig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
prometheus:
2+
build: blocks/prometheus
3+
ports:
4+
- "9090:9090"
5+
volumes:
6+
- /var/docker/prometheus:/prometheus-data
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# my global config
2+
global:
3+
scrape_interval: 10s # By default, scrape targets every 15 seconds.
4+
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
5+
# scrape_timeout is set to the global default (10s).
6+
7+
# Attach these extra labels to all timeseries collected by this Prometheus instance.
8+
labels:
9+
monitor: 'codelab-monitor'
10+
11+
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
12+
rule_files:
13+
# - "first.rules"
14+
# - "second.rules"
15+
16+
# A scrape configuration containing exactly one endpoint to scrape:
17+
# Here it's Prometheus itself.
18+
scrape_configs:
19+
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
20+
- job_name: 'prometheus'
21+
22+
# Override the global default and scrape targets from this job every 5 seconds.
23+
scrape_interval: 5s
24+
scrape_timeout: 10s
25+
26+
# metrics_path defaults to '/metrics'
27+
# scheme defaults to 'http'.
28+
29+
target_groups:
30+
- targets: ['localhost:9090', '172.17.42.1:9091']

0 commit comments

Comments
 (0)