Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.44 KB

readme.md

File metadata and controls

63 lines (43 loc) · 2.44 KB

Supabase Prometheus Metrics & Grafana

Supabase Grafana dashboard

1. Setup Accounts

2. Deploy the Grafana Agent on Fly.io

2A. Create the app

  • Change the app name in the fly.toml
  • Install the flyctl command-line tool: flyctl installation instructions
  • Log into fly: flyctl auth login
  • Create your fly app: flyctl apps create
    • use the app name you added to fly.toml

2B. Gather the necessary secrets

  • SUPABASESERVICEROLESECRET
  • SUPABASEPROJECTURL
  • REMOTEWRITEENDPOINT
    • Grafana prometheus remote write endpoint
    • Grafana Cloud / My Account / Prometheus Details / (Remote Write Endpoint)
  • REMOTEUSERNAME
    • Grafana prometheus Username
    • Grafana Cloud / My Account / Prometheus Details / (Username / Instance ID)
  • REMOTEWRITEPASSWORD
    • Grafana prometheus remote write password
    • Grafana Cloud / My Account / Prometheus Details / (Password / API Key) / Generate now
  • Set your fly.io secrets in the script: set_secrets.sh
  • Set your fly secrets by executing the script: ./set_secrets.sh

2C. Deploy the Grafana Agent App on fly.io

This app will gather data from your Supabase project once per minute and ingest it into Grafana Cloud.

  • Deploy your fly app: fly deploy --config fly.toml

3. Create the Grafana Dashboard

Useful Links

https://grafana.com/docs/agent/latest/getting-started/create-config-file/

Exported metrics:

A list of exported metrics can be found here