upload working configs for docker compose
still needs improvement
This commit is contained in:
parent
8d7fde51fd
commit
5e38812115
|
@ -0,0 +1,40 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
node_exporter:
|
||||
image: prom/node-exporter
|
||||
container_name: node_exporter
|
||||
ports:
|
||||
- 9100:9100
|
||||
networks:
|
||||
- my_network
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
container_name: prometheus
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
networks:
|
||||
- my_network
|
||||
depends_on:
|
||||
- node_exporter
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana-oss
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
|
||||
networks:
|
||||
my_network:
|
||||
driver: bridge
|
|
@ -0,0 +1,18 @@
|
|||
global:
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 15s
|
||||
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: []
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
- job_name: 'node_exporter'
|
||||
static_configs:
|
||||
- targets: ['localhost:9100'] # weird error: in prometheus it shows you cannot scrap from it but if you try to access it, you get container ID(of node exporter) than IP or even localhost
|
Loading…
Reference in New Issue