the basics + the dht node

This commit is contained in:
Alex Grintsvayg 2021-10-22 21:09:23 +00:00
parent d7e30d9496
commit 5ac8bc26b2
4 changed files with 1177 additions and 0 deletions

46
docker-compose.yml Normal file
View file

@ -0,0 +1,46 @@
version: "3.3"
volumes:
grafana-storage:
prom-storage:
services:
prometheus:
image: prom/prometheus:latest
restart: always
volumes:
- prom-storage:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
ports:
- 9090:9090
extra_hosts:
- "host.docker.internal:host-gateway"
grafana:
image: grafana/grafana:latest
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: memorablepassword
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana.ini:/etc/grafana/grafana.ini
- ./grafana-datasource.yml:/etc/grafana/provisioning/datasources/datasource.yaml
depends_on:
- prometheus
ports:
- 3000:3000
node-exporter:
image: prom/node-exporter:latest
container_name: monitoring_node_exporter
restart: unless-stopped
volumes:
- "/:/host:ro,rslave"
command:
- "--path.rootfs=/host"
pid: host
#network_mode: host
expose: [9100]

8
grafana-datasource.yml Normal file
View file

@ -0,0 +1,8 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
isDefault: true
access: proxy
editable: true

1091
grafana.ini Normal file

File diff suppressed because it is too large Load diff

32
prometheus.yml Normal file
View file

@ -0,0 +1,32 @@
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v1
scrape_configs:
- job_name: prometheus
honor_timestamps: true
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- node-exporter:9100
- job_name: grafana
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:3000
- job_name: dht
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:2113