- Prometheus is a solution that is installed during the Fusion installation. Prometheus records metrics, stores them in a time series datastore, and then uses queries to return data for visualizations and alerts. For more information, see the Prometheus documentation.
- Grafana is a tool installed during the Fusion installation. Grafana provides visualizations of multiple datasources and connects to Prometheus, which lets you access your Fusion data when you create or edit the Grafana dashboards. Fusion provides pre-configured Grafana dashboards, but you can also create custom dashboards to analyze metrics further. For more information, see the Grafana documentation.
- Loki is an optional, additional tool that stores, aggregates, and queries logs. You can filter logs based on keywords from specific Fusion namespaces, services, and other elements. For more information, see the Grafana’s Loki documentation.
Configure Grafana, Prometheus, Promtail, and Loki in Fusion
Configure Grafana, Prometheus, Promtail, and Loki in Fusion
Before you perform these installation instructions, you must delete any existing persistent volume claims (PVCs) related to Prometheus, Grafana, Promtail, and Loki on your namespace.
Clone the fusion-cloud-native
repository
Open a terminal window and run following command:Install Grafana
-
In your local
fusion-cloud-native
repository, run the following command for your<cluster>
and<namespace>
:The following is a sample output. The errors are related to resource limits on the sample cluster, and can be ignored. Similar errors may display for your cluster, and do not impact Grafana logging. -
Using the Grafana service endpoint in the newly-installed Grafana helm release, run the following command:
The following is a sample output.If the output does not display, run the following command to expose Grafana, including an
EXTERNAL_IP
for your Grafana LoadBalancer service:
Install Loki
To obtain Loki from the helm chart repository, run the following command for the unique<loki-release-name>
for your cluster:<loki-release-name>
correctly, an error similar to the following displays:Obtain Admin credentials for Grafana
-
After you validate Grafana is running by accessing
<EXTERNAL-IP>:3000
, run the following command to obtain an<admin_password>
for your Grafana instance: - Sign in to Grafana and change the password for security purposes.
-
Run the following command to display the promtail pods that are running:
Promtail pods must match the number of Kubernetes nodes since an instance of Promtail runs on each node.
Add the Loki datsource
- Sign in to Grafana and in the toolbar, click the arrow below Home to display all of the options.
- In the Configuration section, click Data sources.
- Click Add new data source.
- In the search bar for the data source, enter Loki.
-
In the URL field on the Settings screen, enter your unique
<loki-release-name:port>
. The default port for Loki is3100
.If you encounter issues with the<loki-release-name:port>
information, open a terminal and runkubectl get services | grep loki
to display a list of every service with a name that containsloki
along with its associated IP address and port. - Complete the other fields and click Save & test.