OpenShift Monitoring in Rest API Mode

OpenShift Monitoring in Rest API Mode

For the OpenShift monitor, data collection happened using SSH mode which resulted in timeout exception due to the presence of large amount of data. To avoid the timeout exception, enhancement has been made such that data collection takes place using Rest API method for major metrics.

To add OpenShift monitor using Rest API method, please follow the below steps:
  1. Go to the new monitor page and choose OpenShift under Virtualization.
  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.
Note: For the Service Account Token, the user should ensure that "Cluster Administrator Permission" is assigned.

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 admin role to apm(as mentioned in the above command):
    1. oc create clusterrolebinding apm-admin -n default --clusterrole=cluster-admin --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.
          • Related Articles

          • 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***** 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 ...
          • 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 ...
          • 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 ...
          • Prerequisites for monitoring Cron jobs

            Below is the list of prerequisites for monitoring Cron jobs: Curl must be installed in the remote Linux machine.  Script linked to the cron job must have executable permission. The machine where Applications Manager is installed should be reachable ...