0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-06-17 17:19:50 +00:00

scripts: add a dockerized prometheus helper

It makes metrics development easier, with the prometheus image
already seeded with configuration that scrapes events
from localhost:8081.

Runs properly with `cargo run -- --admin-listen-addr 0.0.0.0:8081`
This commit is contained in:
Piotr Sarna
2023-10-31 13:09:23 +01:00
parent 9323ec11fb
commit 1f8973a476
2 changed files with 17 additions and 0 deletions

@ -0,0 +1,14 @@
# my global config
global:
scrape_interval: 5s
evaluation_interval: 5s
scrape_timeout: 4s
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["127.0.0.1:9090"]
- job_name: "sqld"
metrics_path: "/metrics"
static_configs:
- targets: ["host.docker.internal:8081"]

@ -0,0 +1,3 @@
#!/usr/bin/env sh
docker run --net=host --rm --name libsql-server-prometheus -v $(dirname $0)/prometheus_docker.yml:/etc/prometheus/prometheus.yml prom/prometheus