Add example exporting metrics to Prometheus
This commit is contained in:
parent
5783190f58
commit
6d93aed7f1
@ -5,3 +5,4 @@
|
||||
*.so
|
||||
**/__pycache__/
|
||||
scripts/README.md
|
||||
examples/
|
||||
|
3
examples/prom-grafana/Readme.md
Normal file
3
examples/prom-grafana/Readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Example Prometheus Exporter
|
||||
|
||||
An example configuration exporting Minitor stats to Prometheus
|
33
examples/prom-grafana/docker-compose.yml
Normal file
33
examples/prom-grafana/docker-compose.yml
Normal file
@ -0,0 +1,33 @@
|
||||
version: '2'
|
||||
services:
|
||||
prom:
|
||||
image: prom/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
ports:
|
||||
- "8000:3000"
|
||||
volumes:
|
||||
- /var/lib/grafana
|
||||
|
||||
cadvisor:
|
||||
image: google/cadvisor
|
||||
ports:
|
||||
- "8088:8080"
|
||||
volumes:
|
||||
- /:/rootfs:ro
|
||||
- /var/run:/var/run:rw
|
||||
- /sys:/sys:ro
|
||||
- /var/lib/docker:/var/lib/docker:ro
|
||||
|
||||
minitor:
|
||||
build: ../../
|
||||
ports:
|
||||
- "8080:8080"
|
||||
command: [ "--metrics", "-v" ]
|
||||
volumes:
|
||||
- ../../config.yml:/app/config.yml
|
16
examples/prom-grafana/prometheus.yml
Executable file
16
examples/prom-grafana/prometheus.yml
Executable file
@ -0,0 +1,16 @@
|
||||
---
|
||||
global:
|
||||
scrape_interval: 30s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
scrape_interval: 5s
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- job_name: cadvisor
|
||||
static_configs:
|
||||
- targets: ['cadvisor:8080']
|
||||
- job_name: minitor
|
||||
metrics_path: /
|
||||
static_configs:
|
||||
- targets: ['minitor:8080']
|
Loading…
Reference in New Issue
Block a user