# Introduction

If you deploy SonarQube on Kubernetes, the following Prometheus metrics can be collected:

* The metrics exposed on the SonarQube Web API’s monitoring endpoint. Results are returned in [OpenMetrics](https://prometheus.io/docs/instrumenting/exposition_formats/#openmetrics-text-format) text format.
* The JMX metrics exposed by the Prometheus JMX exporter in a format understandable by Prometheus. The exposition of these metrics is disabled by default.

See the [List of Prometheus metrics](/sonarqube-server/10.6/setup-and-upgrade/deploy-on-kubernetes/set-up-monitoring/prometheus-metrics.md) for more information.

The figure below shows in a simplified way the exposition of the Prometheus metrics. Note that:

* The normal metrics are exposed at the `/api/monitoring/metrics` endpoint of the Web API.
* The JMX metrics are exposed at two ports, one for the metrics related to the Compute Engine (CE) process and one for the metrics related to the Web server process of SonarQube.

![](/files/H1Udr57bIMqDkAJoFb48)

You can collect the metrics in different ways, such as:

* Using SonarQube’s built-in integration with Prometheus.\
  In that case, you have to connect Prometheus with an observability platform, for example with Grafana.\
  See [Setting up with Prometheus server](/sonarqube-server/10.6/setup-and-upgrade/deploy-on-kubernetes/set-up-monitoring/prometheus.md).
* Using Datadog.\
  In that case, you can use the Datadog observability platform.\
  See [Setting up with Datadog](/sonarqube-server/10.6/setup-and-upgrade/deploy-on-kubernetes/set-up-monitoring/datadog.md).


---

# 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://docs.sonarsource.com/sonarqube-server/10.6/setup-and-upgrade/deploy-on-kubernetes/set-up-monitoring/introduction.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.
