Skip to content

Commit

Permalink
Add prometheus config
Browse files Browse the repository at this point in the history
  • Loading branch information
anbsky committed Aug 14, 2019
1 parent 088c9b8 commit 2e1f922
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions deployments/docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM alpine
EXPOSE 8080
EXPOSE 2112

# Needed by updater to connect to github
RUN apk --update upgrade && \
Expand Down
19 changes: 19 additions & 0 deletions deployments/docker/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
global:
scrape_interval: 15s

# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'

scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']

- job_name: 'app'
scrape_interval: 1s
static_configs:
- targets: ['app:2112']
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ services:
app:
image: lbry/lbrytv:latest-dev
ports:
- "8080:8080"
- 8080:8080
volumes:
- type: bind
source: storage
Expand All @@ -72,6 +72,12 @@ services:
LW_LBRYNET: http://lbrynet:5279/
depends_on:
- lbrynet
prometheus:
image: prom/prometheus:latest
ports:
- 9090:9090
volumes:
- ${PWD}/deployments/docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml

volumes:
storage:
Expand Down

0 comments on commit 2e1f922

Please sign in to comment.