Grafana Installation
Goal⚓︎
Enable a working Grafana instance in your Hydrolix cluster using the built-in Grafana service.
Overview of steps⚓︎
- Modify the Hydrolix configuration
- Obtain your Grafana administrative password
- View Grafana interface
- Use the Hydrolix data source for queries
Before you begin⚓︎
- Make sure you're running Hydrolix version 5.1 or later.
- Have
kubectl,k9s, or both configured for your Hydrolix instance. - Make sure your Kubernetes cluster has room for the Grafana pod and its renderer sidecar. Their CPU and memory requests depend on your scale profile. For example, the
evalprofile runs one Grafana replica, and theprodprofile runs two.
Installation⚓︎
Modify the Hydrolix configuration⚓︎
Edit your Hydrolix cluster's configuration to include the Grafana in-cluster integration. Add the following lines to the spec: section of your Hydrolix configuration:
Example hydrolixcluster.yaml configuration:
| Example hydrolixcluster.yaml | |
|---|---|
Load the configuration changes into your Hydrolix cluster with kubectl apply -f hydrolixcluster.yaml or by saving your changes in k9s.
Wait for the Grafana pod to start⚓︎
Wait for the Grafana Kubernetes pod to start. This can take several minutes. You can tell when it's ready for use by spotting the Running indicator in the output of the kubectl command.
| Check the Grafana Pod | |
|---|---|
Verify the web interface⚓︎
Make sure you're signed in to your Hydrolix cluster's UI by visiting https://hostname.hydrolix.live in a web browser.
Visit https://hostname.hydrolix.live/grafana in your web browser to see Grafana's UI. You should be directed to a sign-in page.
If the UI isn't available after a few minutes, see Troubleshoot.
Obtain and use your Grafana administrative password⚓︎
The built-in Grafana instance comes with an administrative user named admin and a generated password. To use a different username, set grafana_config.admin_user.
-
Using
k9s- Open
:secretsink9s. - Select the
generalsecret and press x to decode its values. - Locate the value of
GRAFANA_ADMIN_PASSWORD.
- Open
-
Using
kubectl
View the Grafana interface⚓︎
-
Visit https://hostname.hydrolix.live/grafana in your web browser.
-
Use the
adminusername and the password you decoded in the previous step.
Use the Hydrolix data source for queries⚓︎
As of v5.5.0, in-cluster Grafana instances deploy with the Hydrolix data source plugin installed. This data source is viewable at https://hostname.hydrolix.live/grafana/connections/datasources with the name Hydrolix - Local.
Use the Hydrolix data source when querying and configuring dashboards to take advantage of the features in the Hydrolix data source plugin.
To deploy Grafana without this data source, set the grafana_config.datasources.hydrolix_enabled tunable to false. This suits a cluster with no query components running, such as one that's scaled to minimal. This tunable was introduced in Hydrolix version 6.1.
Upgrade the Hydrolix data source plugin by upgrading Hydrolix instead of through the Grafana interface. If you upgrade the plugin in Grafana, Grafana reverts it the next time its pod restarts. Each Hydrolix release ships with a specific plugin version.
Verification⚓︎
Verify metrics are queryable from Grafana by running a test query and optionally creating a dashboard.
- Visit
https://hostname.hydrolix.live/grafana/dashboardsin your web browser. - Select New > New dashboard.
- Select + Add visualization.
- Select
Hydrolix - Localfrom the data source dropdown. -
Paste the following query into the query input box:
-
Change Query Type to TimeSeries.
-
In the right panel, change No value to
0.You should now have a timeseries visualization showing the count of errors by container for your Hydrolix cluster.

-
Select Save dashboard if you want to save this visualization in a new dashboard.
Troubleshoot⚓︎
Not enough resources⚓︎
If the grafana-* pod isn't starting and the kubectl or k9s utility is showing the pod in a pending state, check the resources on the nodes backing your Hydrolix installation. You can lower the CPU and memory that Grafana and its renderer service request from Kubernetes. For more about scaling pods and services, see Scale Clusters with Hydrolix. This example is a low-overhead configuration in the Hydrolix spec file:
| Low-Overhead Grafana Scale Settings | |
|---|---|
PostgreSQL not available⚓︎
Grafana stores its dashboards, users, alerts, and query history in a database named grafana on the same PostgreSQL instance as the Hydrolix catalog database.
Grafana connects to that instance with the pg_ssl_mode setting that the other cluster-internal services use. Its default is disable, so Grafana connects without SSL unless you change it. If your PostgreSQL instance accepts only SSL connections, Grafana can't connect until you set pg_ssl_mode to require, verify-ca, or verify-full:
The pg_ssl_mode tunable configures all PostgreSQL clients in the cluster
This setting applies to every Hydrolix service that connects to the catalog database, not only Grafana.
If Grafana uses its own external database, set in grafana_config.database, Grafana ignores pg_ssl_mode. Set grafana_config.database.ssl_mode to require or disable instead.
Next steps⚓︎
See the Hydrolix Data Source Plugin for Grafana for more details on configuring the data source plugin and a list of plugin features.