Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(katana): docker compose example for setting up monitoring services #2538

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions crates/katana/monitoring/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Katana Monitoring

This directory contains an example of how to set up monitoring for Katana using Prometheus and Grafana.

The `docker-compose.yml` file defines services for:
- Katana node
- Prometheus
- Grafana

Configuration files are provided for Prometheus and Grafana dashboards.

To run:

```
docker-compose up
```

This will start Katana with metrics enabled, Prometheus scraping those metrics, and Grafana dashboards to visualize the data.

Access the Grafana dashboard at http://localhost:3000.
46 changes: 46 additions & 0 deletions crates/katana/monitoring/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "katana"

services:
katana:
restart: unless-stopped
image: ghcr.io/dojoengine/dojo
ports:
- "5050:5050" # rpc
- "9001:9001" # metrics
command: >
katana
--db-dir .katana/data-dir
--metrics 0.0.0.0:9001
--host 0.0.0.0 --port 5050

prometheus:
restart: unless-stopped
image: prom/prometheus
depends_on:
- katana
ports:
- 9090:9090
volumes:
- ./prometheus/:/etc/prometheus/
- prometheusdata:/prometheus
command:
- --config.file=/etc/prometheus/config.yml
- --storage.tsdb.path=/prometheus

grafana:
restart: unless-stopped
image: grafana/grafana
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- grafanadata:/var/lib/grafana

volumes:
prometheusdata:
driver: local
grafanadata:
driver: local
Loading
Loading