First test kinda working
This commit is contained in:
56
monitoring/docker-compose.yml
Normal file
56
monitoring/docker-compose.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
# VictoriaMetrics + Grafana for `quic_ecs_dt` local demos.
|
||||
#
|
||||
# Run from the repo root (or via `make monitoring-up`). The substrate runs on
|
||||
# the host and exposes /metrics on :9100; VM scrapes it via
|
||||
# `host.docker.internal`, which works on Docker Desktop (mac/Windows) and on
|
||||
# recent Docker Engine on Linux thanks to the `extra_hosts` mapping below.
|
||||
#
|
||||
# Grafana auto-provisions:
|
||||
# • a Prometheus-typed data source pointing at VM
|
||||
# • both dashboards from ../dashboards (runtime + sensors)
|
||||
#
|
||||
# Endpoints:
|
||||
# • Grafana http://localhost:3000 (anonymous Admin)
|
||||
# • VictoriaMetrics http://localhost:8428
|
||||
# • Substrate /metrics http://localhost:9100/metrics (on the host)
|
||||
|
||||
services:
|
||||
victoria-metrics:
|
||||
image: victoriametrics/victoria-metrics:v1.115.0
|
||||
container_name: quic_ecs_dt_vm
|
||||
ports:
|
||||
- "8428:8428"
|
||||
command:
|
||||
- "-promscrape.config=/etc/vm/scrape.yml"
|
||||
- "-retentionPeriod=1d"
|
||||
- "-storageDataPath=/storage"
|
||||
volumes:
|
||||
- ./victoria-metrics/scrape.yml:/etc/vm/scrape.yml:ro
|
||||
- vm-data:/storage
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
restart: unless-stopped
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:11.4.0
|
||||
container_name: quic_ecs_dt_grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_AUTH_ANONYMOUS_ENABLED=true
|
||||
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
|
||||
- GF_AUTH_DISABLE_LOGIN_FORM=false
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
- GF_USERS_DEFAULT_THEME=dark
|
||||
volumes:
|
||||
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- ../dashboards:/var/lib/grafana/dashboards:ro
|
||||
- grafana-data:/var/lib/grafana
|
||||
depends_on:
|
||||
- victoria-metrics
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
vm-data:
|
||||
grafana-data:
|
||||
13
monitoring/grafana/provisioning/dashboards/provider.yml
Normal file
13
monitoring/grafana/provisioning/dashboards/provider.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: quic_ecs_dt
|
||||
orgId: 1
|
||||
folder: "quic_ecs_dt"
|
||||
type: file
|
||||
disableDeletion: false
|
||||
updateIntervalSeconds: 10
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
foldersFromFilesStructure: false
|
||||
13
monitoring/grafana/provisioning/datasources/datasource.yml
Normal file
13
monitoring/grafana/provisioning/datasources/datasource.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
uid: prometheus
|
||||
access: proxy
|
||||
url: http://victoria-metrics:8428
|
||||
isDefault: true
|
||||
editable: true
|
||||
jsonData:
|
||||
timeInterval: "1s"
|
||||
httpMethod: "POST"
|
||||
14
monitoring/victoria-metrics/scrape.yml
Normal file
14
monitoring/victoria-metrics/scrape.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
# VictoriaMetrics scrape config — uses Prometheus-compatible syntax.
|
||||
# 1-second interval gives Grafana something to redraw every refresh tick.
|
||||
|
||||
global:
|
||||
scrape_interval: 1s
|
||||
scrape_timeout: 800ms
|
||||
|
||||
scrape_configs:
|
||||
- job_name: substrate
|
||||
static_configs:
|
||||
- targets:
|
||||
- "host.docker.internal:9100"
|
||||
labels:
|
||||
instance: "substrate-local"
|
||||
Reference in New Issue
Block a user