Skip to content

Commit

Permalink
prometheus/grafana already in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ru-rocker committed Mar 31, 2017
1 parent 42ce724 commit 091c336
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -23,3 +23,4 @@ _testmain.go
*.test
*.prof
/log/
/extra/*
17 changes: 17 additions & 0 deletions docker/docker-compose-prometheus-grafana.yml
@@ -0,0 +1,17 @@
version: '2'

services:
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- $PWD/lorem-rate-limit/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
ports:
- 3000:3000
environment:
- GF_SECURITY_ADMIN_PASSWORD=password
volumes:
- $PWD/extra/grafana_db:/var/lib/grafana grafana/grafana
28 changes: 28 additions & 0 deletions lorem-rate-limit/prometheus/prometheus.yml
@@ -0,0 +1,28 @@
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.

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

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

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

static_configs:
- targets: ['localhost:9090']
labels:
group: 'local'

- job_name: 'ru-rocker'
scrape_interval: 5s
static_configs:
- targets: ['192.168.1.103:8080']
labels:
group: 'lorem'

0 comments on commit 091c336

Please sign in to comment.