Skip to content

Commit 9e3b49c

Browse files
authored
Clarifying Grafana reinitialization process with customized dashboards (#865)
<!-- Explain the changes introduced in your PR --> ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel.
1 parent 71f128e commit 9e3b49c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/admin/observability/metrics.mdx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,21 @@ WARNING: By default, our Grafana container runs in anonymous mode with authentic
9090
We recommend you use your network security controls to prevent access to Grafana's listening port, or enable Grafana's built-in authentication.
9191
</Callout>
9292

93-
To enable Grafana's built-in authentication, configure the `GF_AUTH_ANONYMOUS_ENABLED` environment variable to `false` in the Grafana container's environment variables in your deployment override file, then redeploy the Grafana container.
93+
To enable Grafana's built-in authentication, add `GF_AUTH_ANONYMOUS_ENABLED` as `false` in the Grafana container's environment variables in your deployment override file, then redeploy the Grafana container.
9494

9595
We also recommend that you customize the default admin username and password.
9696

97-
For new deployments, configure the `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD` environment variables on the Grafana container, using your deployment pipeline's secrets management tool, to initialize the default admin user. Changing these environment variables do not change the username or password after the user is initialized on first deployment.
97+
For new deployments, configure the `GF_SECURITY_ADMIN_USER` and `GF_SECURITY_ADMIN_PASSWORD` environment variables on the Grafana container, using your deployment pipeline's secrets management tool, before initial deployment, to initialize the default admin user on first deployment.
9898

99-
For existing deployments, you can either:
99+
For existing deployments, you can either log in to the Grafana web UI with the default credentials and it will prompt you to change the password, or you can reinitialize Grafana:
100100

101-
1. Log in to the Grafana web UI with the default credentials, and it will prompt you to change the password.
102-
2. Or, configure the environment variables the same as a new instance, delete the Grafana container's storage volume, and restart the Grafana container. This will cause Grafana to re-initialize, including the default admin user. The contents of the Grafana container's storage volume are ephemeral, so metrics data will not be lost.
101+
1. Export any customized dashboards via JSON (if applicable)
102+
2. Configure the environment variables the same as a new instance
103+
3. Delete the Grafana container's storage volume
104+
4. Redeploy the Grafana container
105+
5. Import any customized dashboards (if applicable)
106+
107+
The contents of the Grafana container's storage volume are ephemeral, so metrics data is not lost in this process.
103108

104109
```yaml
105110
# Helm override

0 commit comments

Comments
 (0)