How to enable and use OTK health check

book

Article ID: 197586

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

As per the OTK product document,

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/layer7-api-management/api-management-oauth-toolkit/4-3/apis-and-assertions/oauth-server-api-endpoints.html

The endpoint "Is only usable if the Gateway cluster property otk.health.apikey is defined. The Gateway cluster property otk.port.health should also be set if it does not match the default 8443."

The statement is not very accurate. Only define the cluster wide properties is not enough.

Environment

Release : 10.0

Component : API GATEWAY

Resolution

To enable the endpoint, need to modify the policy of /auth/oauth/health,

Option 1, set the values directly in policy,

Input the true values for "Set context variable otk.health.apikey as string to: <apikey>", "Set context variable otk.port.health as string to: <port>", at the beginning of the policy, save and activate the policy.

Then call the endpoint as,

curl -kv https://<gatewayhost>:<port>/auth/oauth/health?apikey=<apikey>

 

Option 2, use cluster wide properties,

1. modify the policy and set the variables as below,

"Set context variable otk.health.apikey as string to: ${gateway.otk.health.apikey}"

"Set context variable otk.port.health as string to: ${gateway.otk.port.health}"

2. 

add cluster wide properties otk.health.apikey, otk.port.health on Manage Cluster-Wide Properties window