---
title: Find problems with monitoring
description: Use Headlamp, Grafana, Prometheus and Tempo to find why an OpenLM Platform service restarts, why a page is slow, and whether the cluster has room.
product: OpenLM Platform
---

Use the monitoring tools to answer the questions that come up when you run OpenLM Platform. Each section starts from a problem and shows where to look. The section assumes the tools from [Install the monitoring tools](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/monitoring/monitoring-tools/), with [telemetry turned on](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/monitoring/turn-on-telemetry/).

## A service keeps restarting

When a page of OpenLM Platform stops loading, or loads only now and then, find out whether a service restarted and why:

1. In Headlamp, open **Overview** and choose `openlm` in **Namespaces**. The **Events** list shows the warnings Kubernetes raised, such as failed health checks.

   *The API gateway failed its readiness check while the node was busy starting services*
1. Open **Workloads**, then **Pods**. The **Restarts** column shows how often each pod restarted and how long ago.

   *The API gateway restarted three times, the last time 11 minutes ago*
1. Select the pod to read its events and its log.

With `kubectl`, the same checks are:

```bash
kubectl -n openlm get pods
kubectl -n openlm describe pod <pod>         # Last State, Reason and Events
kubectl -n openlm logs <pod> --previous      # the log of the run before the restart
```

Kubernetes keeps only these two logs, and the monitoring tools don't collect logs. When a service restarts several times, the log that explains the first restart can be gone.

The following table lists the reasons you're most likely to see in `describe pod`:

| You see | Meaning | What to do |
|---|---|---|
| `Last State: Terminated`, `Reason: OOMKilled` | The service used more memory than its limit | Raise the component's `resources.limits.memory` in your values file. See [Values reference](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/reference/values/). |
| Events `Unhealthy` with `Liveness probe failed` | The service didn't answer its health check in time, so Kubernetes restarted it. This happens when a node is short of CPU, for example while many services start at once. | Check the node's CPU in Headlamp or Grafana. If the restarts stop when the node is quiet, the node is too small for peak times. |
| `CrashLoopBackOff` | The service stops each time it starts | Read `logs --previous`. See [Troubleshooting](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/reference/troubleshooting/). |

Kubernetes keeps events for about an hour, and Headlamp shows only what Kubernetes has now. For older restarts, use the **Pod restarts (last hour)** table on the **OpenLM services** dashboard, or the restart history in Prometheus: `increase(kube_pod_container_status_restarts_total{namespace="openlm"}[24h]) > 0`.

## A page is slow

To find which service makes a page slow, and where it spends the time:

1. In Grafana, open the **OpenLM services** dashboard. In **95th percentile response time by service**, find the service whose line goes up when the page is slow. The chart shows, for each service, the time within which 95% of its requests finish.

   *The OpenLM services dashboard. The high line in the response time chart is the first calls of a service after a restart*
1. In **Slowest operations**, find the request of that service that takes the longest. **Slow requests** lists single traces over 300 ms.
1. To read one request, open **Explore**, choose the **Tempo** data source, and search for traces of the service, or paste a trace ID.

A trace shows one request as it passes from service to service. Each bar is one step, called a span, placed where it started and as long as it took.

*One request to License Manager, which called two other services near its end*

In this example, the request to License Manager took 856 ms. License Manager asked the security service for a token (73 ms) and the products service for data (96 ms). The rest of the time passed inside License Manager, with no spans to say on what. Time without spans is often database work that the service doesn't record in its traces. To see which calls a service records, read the configuration line described in [What OpenLM Platform sends](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/monitoring/turn-on-telemetry/#what-openlm-platform-sends).

## The cluster runs out of room

Kubernetes places a pod by its **requests**, the CPU and memory reserved for it, not by what it uses. A node can show plenty of free memory and still refuse new pods because its requests are used up. The new pods then stay `Pending` with `Insufficient memory` or `Insufficient cpu`. Check both figures:

1. **Use**: in Headlamp, **Overview** shows the CPU and memory the cluster uses now. In Grafana, the **Kubernetes / Compute Resources / Namespace (Pods)** dashboard, with `openlm` in **namespace**, shows each pod's use over time, next to its requests and limits.

   *CPU of the openlm namespace. The peak is the topic setup job during an upgrade*
1. **Requests**: run `kubectl describe node <node>` and read **Allocated resources**. It shows the requests of all pods on the node as a percentage of what the node can give.

When the memory requests come close to 100%, a rolling restart or an upgrade can't start the extra pod it needs. Add a node or memory. [Sizing](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/before-you-start/sizing/) shows how much your installation needs.

## Which services depend on which

To see which services call which, and how often, look at the service graph. The **Who calls whom** panel on the **OpenLM services** dashboard shows it for all services. In **Explore**, with the **Tempo** data source, you can also filter it to a few services.

*The service graph filtered to six services. Redis is the busiest dependency*

Each circle is a service or a data service, with its average response time and requests per second. Each arrow is a call. A green ring means the calls succeed, and red marks failed calls. Tempo draws the graph from call rates, so a call that happened only once in the time range can be missing.

## Monitoring shows no data

If a dashboard is empty, find the symptom in the following table:

| Symptom | Check |
|---|---|
| **Services sending traces** shows 0 | The services print `Telemetry:: Telemetry enabled` in their logs, as described in [Check that data arrives](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/monitoring/turn-on-telemetry/#check-that-data-arrives). If they do, read the collector's log: `kubectl -n openlm-telemetry logs deploy/otel-collector` |
| The Kubernetes dashboards are empty | In Prometheus, **Status**, then **Target health**: every target shows **UP** |
| Traces arrive, but the service graph and the **OpenLM services** dashboard stay empty | Prometheus accepts what Tempo writes (`enableRemoteWriteReceiver: true`), and Tempo's log shows no errors: `kubectl -n openlm-telemetry logs tempo-0` |
| The node exporter doesn't start | Another program on the node uses its port. Give it the port 9110, as in the `kps-values.yaml` file of [Install the monitoring tools](https://www.openlm.com/documentation/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/monitoring/monitoring-tools/#install-prometheus-and-grafana). |
| The Grafana target is down after you serve Grafana under a sub-path | Set `grafana.serviceMonitor.path` to the sub-path followed by `/metrics`, for example `/grafana/metrics` |
