OpenShift Monitoring in Rest API Mode

OpenShift Monitoring in Rest API Mode

For the OpenShift monitor, data collection when carried out using SSH mode sometimes results in timeout exception due to the presence of large amount of data to be collected. To avoid this, an enhancement has been made and now data collection will take place using Rest API mode for major metrics.

To add OpenShift monitor using Rest API mode, please follow the below steps:
  1. Go to the new monitor page and choose OpenShift under Virtualization category.
  2. After providing the necessary host details, enable the "Collect Major metrics using Rest API" option.
  3. Provide the Web socket port details and the Service Account Token generated from the Openshift cluster to be monitored(follow the later part of this KB for the steps to generate Service Account Token).
Note: For the Service Account Token, the user should ensure that "Cluster Reader Privilege" is assigned for the Service account used to generate the token.
Steps to obtain service account token:
  1. In the machine where OpenShift is installed, create the service account using the below command:
    1. oc create serviceaccount apm -n default
  2. Assign cluster reader role to the Service account created (apm in our case, as mentioned in the above command):
    1. oc create clusterrolebinding apm-cluster-reader -n default --clusterrole=cluster-reader --serviceaccount=default:apm
  3. To get the service account token, please execute the below command to be used in the add monitor page:
    1. oc serviceaccounts get-token apm -n default
Note: apm is an example user. It can be modified to create a new user or provide the username for the existing user from the OpenShift environment.


        New to ADManager Plus?

          New to ADSelfService Plus?

            • Related Articles

            • Absence of data in the Pods tab or some tabs in the OpenShift monitor

              To collect data for the OpenShift Monitor, Applications Manager uses the SSH protocol to connect to the OpenShift server and execute "oc" commands. However, a timeout issue may occur while collecting data if the environment has a large number of ...
            • REST API Monitor - FAQS

              1. What should I do when Basic Authentication fails in REST API monitor? Verify if the credentials provided in the Applications Manager are correct. Try if sending username and password in Authorization request header works Get an BASE-64 encoded ...
            • Service Now Event Integration using Webhook / Rest API Action

              Steps to perform in Service Now 1) Login to your ServiceNow Instance(dev*****133.service-now.com) 2) Search for the Rest API Explorer and open it 3) In the Rest API Explorer page choose the Namespace and API Name with the proper API version. For ...
            • REST API Monitor Troubleshooting Steps

              1. I'm not able to add a REST API Monitor I'm getting a "Failed" message or 4xx error code: Check the request configuration: Ensure that the request type and the corresponding payload is correct. Check the Authentication details being sent with the ...
            • Monitoring HAProxy - Configuring the HAProxy Stats page

              To monitor a HAProxy instance: Open the 'stats' port for collecting the metrics. To enable metrics collection, add the following content at the bottom of the file /etc/haproxy/haproxy.cfg: listen stats :9000 mode http stats enable stats hide-version ...