# Exercise 3: Metrics and dashboards

In this exercise, we'll explore the third-party monitoring and metrics dashboards that are installed for free with OpenShift!

## Grafana

Red Hat OpenShift on IBM Cloud comes with [Grafana](https://grafana.com/) preinstalled. Get started by switching to the Administrator view:

![Administrator](/files/-M25Xbp2xB21OJoqoLQB)

Then Navigate to `Monitoring > Dashboards` in the left-hand bar. Then click on `Grafana UI` next to the title. You'll be asked to login with OpenShift and then click through some permissions.

![Monitoring Dashboards](/files/-M25Xnr7ukj6tuMKqcv0)

This will open up another proxy page, click `Log in with OpenShift`.

Next, it will ask you for `Authorize Access`, take the default which is both checkboxes, and click `Allow selected permissions`.

You should then see your Grafana dashboard. Hit `Home` on the top left, and choose `Kubernetes / Compute Resources / Namespace (Pods)`.

![Grafana](/files/-M25Xnr9X3bkSSjrxe_y)

Under `namespace`, choose the name of the project you created in [Step 1](/openshift101/workshop/exercise-02.md#deploy-example-health) - the same one that your application is running inside.

You should be able to see the CPU and Memory usage for your application. In production environments, this is helpful for identifying the average amount of CPU or Memory your application uses, especially as it can fluctuate through the day. We'll use this information in the next exercise to set up auto-scaling for our pods.

![Grafana also project](/files/-M25Xbp6AvX6LGkJnwjf)

## Prometheus and Alert Manager

Navigating back to the cluster console, you can also launch Alerting and Metrics UIs

* [**Prometheus**](https://prometheus.io/) - a monitoring system with an efficient time series database
* [**Alertmanager**](https://prometheus.io/docs/alerting/alertmanager/) - an extension of Prometheus focused on managing alerts

![Metrics, Alerts and Dashboards](/files/-M25Xbp8n-qE03vjRfv-)

## Prometheus

![Prometheus](/files/-M25XbpA8xb-NpSkOhDp)

## Alertmanager

![Alert Manager](/files/-M25XbpCCTnUxsHpi1W4)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ibm-developer.gitbook.io/openshift101/workshop/exercise-03.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
