Self-hosted Grafana
Setting up a self-hosted Grafana instance inside CKS
If more customization and control is required than what CoreWeave's Managed Grafana offering provides, a self-hosted Grafana instance is also supported. With self-hosting, clients can create new dashboards, export or edit CoreWeave's existing dashboards, and can freely explore all available metrics collected within your environment.
Self-hosted Grafana instances are deployed via CoreWeave Charts. This handles most of the process of configuring Data Sources, however authentication requires some manual configuration.
Prerequisites
To set up a self-hosted Grafana instance, you will need:
- A CoreWeave API Access Token for an active CKS account
- A CKS cluster where you intend to self-host (i.e. deploy and manage) Grafana
kubectl
installedhelm
installed
Customers opting to self-host a Grafana instance are responsible for all setup, maintenance, and resource costs associated with hosting. Using Managed Grafana is recommended.
Install Grafana with CoreWeave Charts
First, access the CoreWeave Charts repository with the following command:
$helm repo add coreweave https://charts.core-services.ingress.coreweave.com
Next, install the grafana
chart:
$helm install -n <my-namespace> grafana coreweave/grafana
The grafana-dashboards
chart is a dependency of grafana
, so it does not need to be installed independently.
Log in to Grafana with admin credentials
The admin password is required to log in to Grafana for the first time. This password is stored as a Kubernetes Secret.
To obtain the Secret value, run the following command, replacing <my-namespace>
with your namespace ID:
$kubectl get secret grafana -n <my-namespace> -o=jsonpath='{.data.admin-password}' | base64 --decode
Use the returned value as your password when logging in to Grafana. Now you can log in to Grafana with the following credentials:
Field | Value |
---|---|
Username | admin |
Password | <my-secret> |
Configure CoreWeave Metrics data source credentials
After logging in to Grafana with your admin credentials, you must configure credentials for the CoreWeave-provided Data Sources. First, configure the CoreWeave Metrics data source.
Configure the data source HTTP headers
The following HTTP header values are required to connect to CoreWeave's data sources, where <MY-TOKEN>
is your CoreWeave API Access Token.
Field | Value |
---|---|
Header | Authorization |
Value | Bearer <MY-TOKEN> |
To configure these headers, navigate to Connections from Grafana's left-hand menu to display the dropdown options. Then, click Data sources to proceed to the Data sources page. Select CoreWeave Metrics from the options listed to proceed to the Settings menu for the new data source.
Next, navigate to the Authentication section. This is the only section that requires editing.
Then, click the dropdown arrow on the right-hand side of the HTTP headers subsection to display the + Add header button.
In the Header field, enter Authorization
.
After adding the desired data sources, use the Data Source dropdown menu in Grafana to select which of the available data sources to display in the current dashboard:
In the Value field, provide the value Bearer <MY-TOKEN>
, where <MY-TOKEN>
is your CoreWeave API Access Token.
Configure the CoreWeave Logs data source
Once the configuration for the CoreWeave Metrics data source is complete, repeat the steps above for the CoreWeave Logs Data Source.
Learn more
For more information, explore the following resources:
- Grafana documentation on building dashboards, working with Data Sources, exploring metrics, and more.
- Prometheus Query Language (PromQL) documentation to learn how to get maximum utility from the CoreWeave Metrics data in both ad-hoc Explore queries and building advanced dashboard panels.