×

In OKD 4, you cannot access third-party web browser user interfaces (UIs) for the following monitoring components: Alertmanager, Prometheus, Thanos Ruler, and Thanos Querier. However, you can access the web UI for Grafana, although this access is deprecated and is planned to be removed in a future OKD release. In addition, you can access web service APIs for third-party monitoring components from the command line interface (CLI).

Accessing third-party monitoring UIs

OKD does not provide or support direct access to third-party web user interfaces (UIs) for the following components in the monitoring stack: Alertmanager, Prometheus, Thanos Ruler, and Thanos Querier. As an alternative to these third-party UIs, navigate to the Observe section of the OKD web console to access alerting, metrics, dashboards, targets, and other UIs for platform components.

Although you can access the third-party Grafana web UI from the web console or the CLI, this access is deprecated and is planned to be removed in a future OKD release.

Accessing third-party monitoring web service APIs

You can directly access third-party web service APIs from the command line for monitoring stack components such as Prometheus, Alertmanager, Thanos Ruler, and Thanos Querier.

The following example commands show how to query the service API receivers for Alertmanager. This example requires that the associated user account be bound against the monitoring-alertmanager-edit role in the openshift-monitoring namespace and that the account has the privilege to view the route. This access only supports using a Bearer Token for authentication.

$ oc login -u <username> -p <password>
$ host=$(oc -n openshift-monitoring get route alertmanager-main -ojsonpath={.spec.host})
$ token=$(oc whoami -t)
$ curl -H "Authorization: Bearer $token" -k "https://$host/api/v2/receivers"

To access Thanos Ruler and Thanos Querier service APIs, the requesting account must have get permission on the namespaces resource, which can be done by granting the cluster-monitoring-view cluster role to the account.