Skip to content

Commit

Permalink
Add prom server & grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
ale8k committed Nov 28, 2021
1 parent dc7a051 commit b433eb0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
28 changes: 26 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- lubso
working_dir: "/usr/src/app"
ports:
- 8001:8000
- 8001:9000
environment:
KAFKA_BROKER_ADDRS: "kafka:9092"
volumes:
Expand Down Expand Up @@ -42,4 +42,28 @@ services:
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ALLOW_ANONYMOUS_LOGIN=yes

grafana:
image: grafana/grafana:5.1.0
networks:
- lubso
ports:
- 8002:3000

prometheus:
image: prom/prometheus:v2.1.0
volumes:
- "./prometheus.yml/:/etc/prometheus/prometheus.yml"
- "prometheusVol:/prometheus"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- 8003:9090
networks:
- lubso
restart: always

volumes:
prometheusVol: {}
grafanaVol: {}
29 changes: 29 additions & 0 deletions prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# my global config
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).

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

# Load and evaluate rules in this file every 'evaluation_interval' seconds.
# rule_files:
# - 'alert.rules'

# 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: 'language_stats_app'

# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s

static_configs:
- targets: ['app:9000']



0 comments on commit b433eb0

Please sign in to comment.