{"id":15173149,"url":"https://github.com/supabase/grafana-agent-fly-example","last_synced_at":"2025-10-01T10:31:31.511Z","repository":{"id":65982096,"uuid":"478749721","full_name":"supabase/grafana-agent-fly-example","owner":"supabase","description":"Deploy a Grafana Agent on Fly to scrape Prometheus metrics from Supabase and send them to Grafana Cloud","archived":true,"fork":false,"pushed_at":"2023-11-07T09:18:30.000Z","size":1151,"stargazers_count":36,"open_issues_count":2,"forks_count":8,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-01-14T16:21:43.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supabase.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-04-06T22:43:13.000Z","updated_at":"2024-03-04T19:43:20.000Z","dependencies_parsed_at":"2023-09-23T01:03:32.151Z","dependency_job_id":"d8904c54-629e-431d-bcf9-9c01baba8740","html_url":"https://github.com/supabase/grafana-agent-fly-example","commit_stats":{"total_commits":17,"total_committers":5,"mean_commits":3.4,"dds":0.5294117647058824,"last_synced_commit":"8126bc6e80b2def35ffc76d2dcf31c11e987c4bf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fgrafana-agent-fly-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fgrafana-agent-fly-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fgrafana-agent-fly-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fgrafana-agent-fly-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/grafana-agent-fly-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234693694,"owners_count":18872647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-27T10:41:30.105Z","updated_at":"2025-10-01T10:31:26.096Z","avatar_url":"https://github.com/supabase.png","language":"Shell","funding_links":["https://github.com/sponsors/supabase"],"categories":[],"sub_categories":[],"readme":"# ⚠️ This repository has been deprecated and it is no longer maintained ⚠️\n## Please use the resources located at [supabase/supabase-grafana](https://github.com/supabase/supabase-grafana) instead.\n\n---\n\n# Supabase Prometheus Metrics \u0026 Grafana\n![Supabase Grafana dashboard](supabase-grafana-prometheus.png)\n\n## 1. Setup Accounts\n\n1. Create an account on Grafana (https://grafana.com)\n2. Create an account on Fly.io (https://fly.io)\n3. You should already have a Supabase account and a Supabase project\n\n## 2. Deploy the Grafana Agent on Fly.io\n\n### 2A. Create the app\n\n1. Change the `app` name in the `fly.toml`\n2. Install the `flyctl` command-line tool: [flyctl installation instructions](https://fly.io/docs/hands-on/install-flyctl)\n3. Log into fly: `flyctl auth login`\n4. Create your fly app: `flyctl apps create`\n   4.1 use the app name you added to `fly.toml`\n\n### 2B. Gather the necessary secrets\n\n1. `SUPABASESERVICEROLESECRET`\n    * Supabase service role secret\n    * found here: [https://supabase.com/dashboard/project/_/settings/api](https://supabase.com/dashboard/project/_/settings/api)\n2. `SUPABASEPROJECTURL`\n    * Supabase project url\n    * found here: [https://supabase.com/dashboard/project/_/settings/api](https://supabase.com/dashboard/project/_/settings/api)\n    * exclude the `https://` part, for example: `zzzzzzzzzzzzzzzzzzzz.supabase.co`\n3. `REMOTEWRITEENDPOINT`\n    * Grafana prometheus remote write endpoint\n    * [Grafana Cloud](https://grafana.com) / My Account / Prometheus Details / (Remote Write Endpoint)\n4. `REMOTEUSERNAME`\n    * Grafana prometheus Username\n    * [Grafana Cloud](https://grafana.com) / My Account / Prometheus Details / (Username / Instance ID)\n5. `REMOTEWRITEPASSWORD`\n    * Grafana prometheus remote write password\n    * [Grafana Cloud](https://grafana.com) / My Account / Prometheus Details / (Password / API Key) / Generate now\n\n### 2C. Save the gathered secrets\n\n1. Set your `fly.io` secrets in the script: [set_secrets.sh](./set_secrets.sh)\n\n\u003e **Warning**\n\u003e If you skip this step, you'll likely see errors later on such as `error loading config file /etc/agent/agent.yaml: url for remote_write is empty` and `Error: smoke checks for 01234567890 failed: the app appears to be crashing`\n\n### 2D. Deploy the `Grafana Agent App` on `fly.io`\n\nThis app will gather data from your Supabase project once per minute and ingest it into Grafana Cloud.\n\n * Deploy your fly app: `fly deploy --config fly.toml`\n\n## 3. Create the Grafana Dashboard\n\n 1. [Grafana Cloud](https://grafana.com) / My Account / Grafana / Launch\n 2. Menu / Dashboards / New / Import\n 3. Upload JSON file: [panels-full.json](./panels-full.json)\n\n\n### Useful Links\n\n[https://grafana.com/docs/agent/latest/getting-started/create-config-file/](https://grafana.com/docs/agent/latest/getting-started/create-config-file/)\n\n\n### Exported metrics:\n\nA list of exported metrics can be found [here](./metrics.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fgrafana-agent-fly-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fgrafana-agent-fly-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fgrafana-agent-fly-example/lists"}