Observability for your Supabase project, using Prometheus/Grafana, collecting ~200 metrics:
To run the collector locally using Docker Compose:
Create an .env
file:
cp .env.example .env
Fill it out with your project details. You'll need your project ref and service role key, which you can find here. Alternatively, to monitor multiple projects you'll need to create an access token here.
After that, simply start docker compose and you will be able to access Grafana:
docker compose up
Visit localhost:8000 and login with the credentials:
- Username:
admin
- Password: [the password in your
.env
file]
Deploy this service to a server which is always running to continuously collect metrics for your Supabase project.
You can run the collector on a free instance of Fly.io
Follow these steps:
- Make sure you have the Fly CLI installed, and you are logged in.
- Run
fly launch
to deploy the app to Fly. - Copy your
.env
file to your Fly project:fly secrets import < .env
- After a successful deployment, your app will be available at
https://<your-app-name>.fly.dev
You can also run the collector on your own server using Caprover.
Follow these steps:
- Create a new app on Caprover with persistent data.
Optional:- Set container http port to 8080.
- Enable HTTPS and force redirect.
- Copy your
.env
file to your Caprover app configuration. - Add persistent storage for the
/data
directory. - Deploy the app.