Commit e6c0cd6f authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'rp-add-prometheus-development-docs' into 'master'

Add docs showing how to connect to Prometheus UI

See merge request gitlab-org/gitlab!28099
parents 0edfe6f7 d3945068
...@@ -81,7 +81,7 @@ Complementary reads: ...@@ -81,7 +81,7 @@ Complementary reads:
- [Working with Merge Request diffs](diffs.md) - [Working with Merge Request diffs](diffs.md)
- [Kubernetes integration guidelines](kubernetes.md) - [Kubernetes integration guidelines](kubernetes.md)
- [Permissions](permissions.md) - [Permissions](permissions.md)
- [Prometheus metrics](prometheus_metrics.md) - [Prometheus](prometheus.md)
- [Guidelines for reusing abstractions](reusing_abstractions.md) - [Guidelines for reusing abstractions](reusing_abstractions.md)
- [DeclarativePolicy framework](policies.md) - [DeclarativePolicy framework](policies.md)
- [How Git object deduplication works in GitLab](git_object_deduplication.md) - [How Git object deduplication works in GitLab](git_object_deduplication.md)
......
# Working with Prometheus
For more information on working with [Prometheus metrics](prometheus_metrics.md), see
the documentation.
## Access the UI of a Prometheus managed application in Kubernetes
You can connect directly to Prometheus, and view the Prometheus user interface, when
using a Prometheus managed application in Kubernetes:
1. Find the name of the Prometheus pod in the user interface of your Kubernetes
provider, such as GKE, or by running the following `kubectl` command in your
terminal:
```shell
kubectl get pods -n gitlab-managed-apps | grep 'prometheus-prometheus-server'
```
The command should return a result like the following example, where
`prometheus-prometheus-server-55b4bd64c9-dpc6b` is the name of the Prometheus pod:
```plaintext
gitlab-managed-apps prometheus-prometheus-server-55b4bd64c9-dpc6b 2/2 Running 0 71d
```
1. Run a `kubectl port-forward` command. In the following example, `9090` is the
Prometheus server's listening port:
```shell
kubectl port-forward prometheus-prometheus-server-55b4bd64c9-dpc6b 9090:9090 -n gitlab-managed-apps
```
The `port-forward` command forwards all requests sent to your system's `9090` port
to the `9090` port of the Prometheus pod. If the `9090` port on your system is used
by another application, you can change the port number before the colon to your
desired port. For example, to forward port `8080` of your local system, change the
command to:
```shell
kubectl port-forward prometheus-prometheus-server-55b4bd64c9-dpc6b 8080:9090 -n gitlab-managed-apps
```
1. Open `localhost:9090` in your browser to display the Prometheus user interface.
...@@ -837,6 +837,11 @@ Prerequisites for embedding from a Grafana instance: ...@@ -837,6 +837,11 @@ Prerequisites for embedding from a Grafana instance:
## Troubleshooting ## Troubleshooting
When troubleshooting issues with a managed Prometheus app, it is often useful to
[view the Prometheus UI](../../../development/prometheus.md#access-the-ui-of-a-prometheus-managed-application-in-kubernetes).
### "No data found" error on Metrics dashboard page
If the "No data found" screen continues to appear, it could be due to: If the "No data found" screen continues to appear, it could be due to:
- No successful deployments have occurred to this environment. - No successful deployments have occurred to this environment.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment