...
This page describes
...
how you can set up Grafana on your cluster to help visualize the metrics retrieved by the Prometheus server.
It also contains example dashboards both as zip and yaml-files that you can download with these links:
On Private Cloud and AWS
...
The steps for installing the Grafana tool using helm, as well as how to integrate it with
...
your Usage Engine deployment, are described in this section. Before
...
proceeding, see information on how to install Grafana using helm
...
at https://github.com/grafana/helm-charts/tree/main/charts/grafana.
Before
...
you install Grafana, it is recommended that you install the Prometheus server
...
, see Setting up Prometheus(4.1)
...
.
...
...
The procedure described below is just one of many ways to install Grafana. The example provided uses the helm charts to install Grafana. However, you can install Grafana using any method you want.
Note | |
---|---|
title | Note!If you have installed your Prometheus server in its own namespace, make sure ensure that Grafana has access to the Prometheus server. |
Installing Grafana without Persistence
The following steps show describe how to you install Grafana without the use of persistence. This means , meaning that if your deployment is brought goes down, the data is not retained. We do not recommend deploying Grafana without persistence in a production environment.
Add the helm repo for Grafana
...
by running the following command:
Code Block helm repo add grafana https://grafana.github.io/helm-charts
To view data in Grafana you need to create one or more "dashboards". You can create them manually in the Grafana GUI or use a yaml file to create them in advance. This yaml file, grafana-dashboards.yaml, includes three pre-created dashboards for pico statistics, workflows, and MIMs. You can also
...
use your own yaml file with your own dashboard and data source configuration for this installation. You
...
must link the Prometheus server as your data source.
Install Grafana using the
helm install
command. This example shows how to install Grafana in its own namespace called Grafana. Enter the Grafana node port number. If you have another dashboard yaml file, you can replace the value by <dashboard yaml name>.Code Block helm install -n <namespace> grafana grafana/grafana \ --set service.type=NodePort \ --set service.nodePort=<port> \ -f ./<dashboard yaml name>
Info |
---|
...
Example: helm install Grafana
|
Installing Grafana with Persistence
The following steps show how to install Grafana with the use of using persistence volumes on your Kubernetes cluster.
Create a yaml file and describe the Persistent Volume and Persistent Volume Claim for Grafana. The example
...
below creates the persistent volume on an NFS file server that is mounted onto the cluster. The value set in nfs.path is the directory on the NFS file server that stores the data for Grafana.
Info |
---|
...
Example: Persistence for Grafana
|
...
When the yaml file has been created, run this command:
Code Block kubectl apply -f <persistent volume yaml> -n <namespace>
Add the helm repo for Grafana
...
by running this command:
Code Block helm repo add grafana https://grafana.github.io/helm-charts
To view data in grafana you need to create one or more "dashboards". You can create them manually in the Grafana GUI or import them from json based definition files. This zip file, grafana-dashboards.zip, includes three pre-created dashboards for pico statistics, workflows, and MIMs. You
...
must link the Prometheus server as your data source.
Install Grafana using the
helm install
command. In this example, Grafana is installed in its own namespace called grafana. Enter the Grafana node port number. Set the name of the Persistent Volume Claim
...
created in the previous steps.
If you have another dashboard yaml file, you can replace the value by <dashboard yaml name>.Code Block helm install -n <namespace> grafana grafana/grafana \ --set service.type=NodePort \ --set service.nodePort=<port> \ --set persistence.enabled=true \ --set persistence.accessMode=ReadWriteMany \ --set persistence.storageClass=grafana-persistent \ --set persistence.existingClaim="grafana-persistent" \ -f ./<dashboard yaml name>
Info |
---|
...
Example: helm |
...
Install Grafana - |
...
With Persistence
|
Verify the Grafana Installation
This step shows describes how to check that your Grafana is deployed correctly.
Excerpt | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
After installing
| title |
Example: Exporting the |
Value for Grafana Node IP and Node Port
|
To generate the URL from the result of the two export commands above, use this echo command. Then copy the result to your browser.
Code Block echo http://$NODE_IP:$NODE_PORT
Info |
---|
Example: Url for Grafana GUI
|
Retrieve the password of the admin user for Grafana. After
having installed Grafana, you are prompted with a message informing you how to retrieve the password. This is an example of
how the command may look:
Info |
---|
Example
|
Note |
---|
Note! If you do not have the password randomly assigned you can manually define the default admin username and password with extra variables when you run the |