38 lines
1.2 KiB
Markdown
38 lines
1.2 KiB
Markdown
# Monitoring integration
|
|
|
|
GuardDen exposes Prometheus metrics from the bot and dashboard services. You can
|
|
keep using your existing Grafana instance by pointing it at your Prometheus
|
|
server (yours or the optional one in this repo).
|
|
|
|
## Option A: Use the bundled Prometheus, external Grafana
|
|
|
|
Start only Prometheus:
|
|
|
|
```bash
|
|
docker compose --profile monitoring up -d prometheus
|
|
```
|
|
|
|
Add a Prometheus datasource in your Grafana:
|
|
- URL from the same Docker network: `http://guardden-prometheus:9090`
|
|
- URL from the host: `http://localhost:9090` (or your mapped port)
|
|
|
|
## Option B: Use your own Prometheus + Grafana
|
|
|
|
Merge the scrape jobs from `monitoring/prometheus.yml` into your Prometheus
|
|
config. The main endpoints are:
|
|
- bot: `http://<bot-host>:8001/metrics`
|
|
- dashboard: `http://<dashboard-host>:8000/metrics`
|
|
- postgres-exporter: `http://<pg-exporter-host>:9187/metrics`
|
|
- redis-exporter: `http://<redis-exporter-host>:9121/metrics`
|
|
|
|
Then add (or reuse) a Prometheus datasource in Grafana that points to your
|
|
Prometheus URL.
|
|
|
|
## Optional internal Grafana
|
|
|
|
If you want the repo's Grafana container, enable its profile:
|
|
|
|
```bash
|
|
docker compose --profile monitoring --profile monitoring-grafana up -d
|
|
```
|