The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Add grafana installation docs (#28799)
TheOtherBrian17524b47f166c
diff --git a/apps/docs/content/guides/platform/metrics.mdx b/apps/docs/content/guides/platform/metrics.mdxindex f9d83c6ff08..66f446359bd 100644--- a/apps/docs/content/guides/platform/metrics.mdx+++ b/apps/docs/content/guides/platform/metrics.mdx@@ -30,7 +30,7 @@ Your project's metrics endpoint is accessible at `https://<project-ref>.supabase## Configuring Prometheus-For self-hosted prometheus, modify your `prometheus.yaml` file to add a Supabase job, and set the `metrics_path`, `scheme`, `basic_auth` and `targets` parameters. For example:+For self-hosted Prometheus, modify your `prometheus.yaml` file to add a Supabase job, and set the `metrics_path`, `scheme`, `basic_auth` and `targets` parameters. For example:```yamlscrape_configs:@@ -48,4 +48,247 @@ scrape_configs:group: "MyGroupLabel"```-Additionally, we [maintain a guide](https://github.com/supabase/supabase-grafana) on quickly setting up a scraping agent to work with Grafana Cloud.+Additionally, we [maintain a repo](https://github.com/supabase/supabase-grafana) for a scraping agent to work with Grafana Cloud.++## Deploying Supabase Grafana++The pre-configured Supabase Grafana Dashboard is an advanced version of the [Dashboard's Database Reports](https://supabase.com/dashboard/project/_/reports/database). It visualizes over 200 database performance and health metrics and is updated every minute.++++### Deploying locally++Prerequisites:++- Must have [Docker](https://www.docker.com/products/docker-desktop/) or a Docker compatible runtime on your machine++<Admonition type="note">++Supabase Grafana only tracks metrics while it's active. For monitoring historical trends, it's better to use a dedicated server that can record data continuously.++</Admonition>++<StepHikeCompact>++ <StepHikeCompact.Step step={1} >++ <StepHikeCompact.Details title="Download the project">+ Download the code from the [Github repo](https://github.com/supabase/supabase-grafana/tree/main)+++ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ ```sh+ git clone https://github.com/supabase/supabase-grafana.git+ ```+ </StepHikeCompact.Code>++ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={2} >++ <StepHikeCompact.Details title="Create a .env file">+ copy the `example.env` into a new `.env`++ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ ```sh+ cp .env.example .env+ ```+ </StepHikeCompact.Code>++ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={3}>++ <StepHikeCompact.Details title="Add your credentials">+ - To monitor a single project, add your service_role key from the [API Settings](https://supabase.com/dashboard/project/_/settings/api) and Reference ID from the [General Settings](https://supabase.com/dashboard/project/_/settings/general).+ - To monitor multiple projects, create an [account access token](https://supabase.com/dashboard/account/tokens) and add it to your `.env` file.++ </StepHikeCompact.Details>++ <StepHikeCompact.Code>+ <Tabs+ scrollable+ size="small"+ type="underlined"+ defaultActiveId="single-project"+ >+ <TabPanel id="single-project" label="Monitor a single project">+++ - Add the values to your `.env` file:+ ```text .env+ SUPABASE_PROJECT_REF=<your_project_reference>+ SUPABASE_SERVICE_ROLE_KEY=<your_service_role>+ ```+ </TabPanel>+ <TabPanel id="monitor-an-org" label="monitor multiple projects">+++ ```text .env+ SUPABASE_ACCESS_TOKEN=<your_access_token>+ ```+ </TabPanel>+ </Tabs>+ </StepHikeCompact.Code>++ </StepHikeCompact.Step>+ <StepHikeCompact.Step step={4}>+ <StepHikeCompact.Details title="Add a password to your .env">+ <Admonition type="note" label="password manager">+ For security, consider using a [password generator](https://bitwarden.com/password-generator/)+ </Admonition>+++ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ ```text .env+ GRAFANA_PASSWORD=<your password>+ ```+ </StepHikeCompact.Code>+ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={5}>+ <StepHikeCompact.Details title="Deploy Grafana with Docker">+++ Deploy the server. Once it is active, you can go to <a href='http://localhost:8000/login'>localhost:8000/login</a> in the browser++ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ ```text+ docker compose up+ ```+ </StepHikeCompact.Code>++ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={6}>+ <StepHikeCompact.Details title="Login" >+ Login with your username (default is `admin`) and the password you created in step 4.+ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>+ </StepHikeCompact.Step>++</StepHikeCompact>++### Deploying to Grafana cloud++<StepHikeCompact>++ <StepHikeCompact.Step step={1}>++ <StepHikeCompact.Details title="Create a free Grafana Cloud account" >+ Go to Grafana\'s [registration form](https://grafana.com/auth/sign-up/create-user?pg=login) and create an account+ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>+ </StepHikeCompact.Step>+++ <StepHikeCompact.Step step={2} >++ <StepHikeCompact.Details title="Give a name to your Grafana project">+ Grafana will prompt you to create a stack. Give it a name and continue.+ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>++ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={3} >++ <StepHikeCompact.Details title="Create a new Grafana Dashboard">+ Create a new Dashboard+ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>+++ </StepHikeCompact.Step>+ <StepHikeCompact.Step step={4} >+ <StepHikeCompact.Details title="Search for the Supabase template" />++ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>+++ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={5} >+ <StepHikeCompact.Details title="Add your credentials and deploy">+ Add your service_role key from the [API Settings](https://supabase.com/dashboard/project/_/settings/api) and Reference ID from the [General Settings](https://supabase.com/dashboard/project/_/settings/general) to your Grafana credentials. Then install your dashboard.+ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>++ </StepHikeCompact.Step>++</StepHikeCompact>++### Deploying to fly.io++<Admonition type="note">+ This section explains deploying to Fly.io using the included configuration file, but deployment to+ other hosts is also possible.+</Admonition>++<StepHikeCompact>++ <StepHikeCompact.Step step={1} fullWidth>++ <StepHikeCompact.Details title="Initialize project locally" >+ Follow steps 1 through 4 for [local setups](#deploying-locally)+ </StepHikeCompact.Details>+ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={2} >++ <StepHikeCompact.Details title="Create a fly.io account">+ If you do not already have one, create a [fly.io account](https://fly.io/app/sign-up).++ Go through the [onboarding process](https://fly.io/dashboard/personal/new-launch?onboarding=1), including downloading the [Fly CLI tool](https://fly.io/docs/flyctl/install/)+ </StepHikeCompact.Details>+ <StepHikeCompact.Code>+ + </StepHikeCompact.Code>++ </StepHikeCompact.Step>++ <StepHikeCompact.Step step={3} >++ <StepHikeCompact.Details title="Deploy your project"/>+ <StepHikeCompact.Code>+ Log into your Fly account through the CLI:+ ```sh login+ fly auth login+ ```++ Deploy your project with the Fly CLI+ ```sh deploy_to_fly+ fly launch --copy-config+ fly secrets import < .env+ ```+ </StepHikeCompact.Code>+++ </StepHikeCompact.Step>+ <StepHikeCompact.Step step={4} >++ <StepHikeCompact.Details title="Access your project" fullWidth>+ - Go to your [Fly.io Dashboard](https://fly.io/dashboard) and select your project.+ - It may take a few minutes for the project to spin up. Once it's ready, click on the project's link to view your Grafana Dashboard.+ - When prompted, enter the username admin and the password you created earlier.+ </StepHikeCompact.Details>++ </StepHikeCompact.Step>++</StepHikeCompact>diff --git a/apps/docs/public/img/guides/platform/add-credentials-grafana.png b/apps/docs/public/img/guides/platform/add-credentials-grafana.pngnew file mode 100644index 00000000000..f3903f6d306Binary files /dev/null and b/apps/docs/public/img/guides/platform/add-credentials-grafana.png differdiff --git a/apps/docs/public/img/guides/platform/create-grafana-stack.png b/apps/docs/public/img/guides/platform/create-grafana-stack.pngnew file mode 100644index 00000000000..123394576abBinary files /dev/null and b/apps/docs/public/img/guides/platform/create-grafana-stack.png differdiff --git a/apps/docs/public/img/guides/platform/fly-signin.png b/apps/docs/public/img/guides/platform/fly-signin.pngnew file mode 100644index 00000000000..8b5fda7ebe6Binary files /dev/null and b/apps/docs/public/img/guides/platform/fly-signin.png differdiff --git a/apps/docs/public/img/guides/platform/grafana-login.png b/apps/docs/public/img/guides/platform/grafana-login.pngnew file mode 100644index 00000000000..7694b5e8fb3Binary files /dev/null and b/apps/docs/public/img/guides/platform/grafana-login.png differdiff --git a/apps/docs/public/img/guides/platform/grafana-project.png b/apps/docs/public/img/guides/platform/grafana-project.pngnew file mode 100644index 00000000000..3b313e75854Binary files /dev/null and b/apps/docs/public/img/guides/platform/grafana-project.png differdiff --git a/apps/docs/public/img/guides/platform/grafana-registration.png b/apps/docs/public/img/guides/platform/grafana-registration.pngnew file mode 100644index 00000000000..334099d209bBinary files /dev/null and b/apps/docs/public/img/guides/platform/grafana-registration.png differdiff --git a/apps/docs/public/img/guides/platform/select-grafana-dashboard.png b/apps/docs/public/img/guides/platform/select-grafana-dashboard.pngnew file mode 100644index 00000000000..3b313e75854Binary files /dev/null and b/apps/docs/public/img/guides/platform/select-grafana-dashboard.png differdiff --git a/apps/docs/public/img/guides/platform/supabase-grafana-prometheus.png b/apps/docs/public/img/guides/platform/supabase-grafana-prometheus.pngnew file mode 100644index 00000000000..13e235f5fc9Binary files /dev/null and b/apps/docs/public/img/guides/platform/supabase-grafana-prometheus.png differdiff --git a/apps/docs/public/img/guides/platform/supabase-grafana-template.png b/apps/docs/public/img/guides/platform/supabase-grafana-template.pngnew file mode 100644index 00000000000..66d7689e2a8Binary files /dev/null and b/apps/docs/public/img/guides/platform/supabase-grafana-template.png differdiff --git a/vale/styles/config/vocabularies/Supabase/accept.txt b/vale/styles/config/vocabularies/Supabase/accept.txtindex 2d56cae94d8..5d5b424d31f 100644--- a/vale/styles/config/vocabularies/Supabase/accept.txt+++ b/vale/styles/config/vocabularies/Supabase/accept.txt@@ -24,6 +24,7 @@ Hashicorp[Gg]eospatialGPUs?Gradle+GrafanaGraphQLGroongahref