Accessing third-party monitoring UIs and APIs

In OKD 4.10, you cannot access third-party web browser user interfaces (UIs) for the following monitoring components: Alertmanager, Thanos Ruler, and Thanos Querier. However, you can access web UIs for Grafana and Prometheus, 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, 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 metrics, alerting, metrics targets, and dashboard UIs for platform components.

Although you can access the third-party Grafana and Prometheus web UIs 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 shows 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.

  1. $ host=$(oc -n openshift-monitoring get route alertmanager-main -ojsonpath={.spec.host})
  2. $ token=$(oc whoami -t)
  3. $ 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.

Additional resources