Page created: 12 May 2021
|
Page updated: 1 Nov 2021
Complete the following steps to attach the PingIntelligence policy to your API:
Note: If you are applying the PingIntelligence policy in
Mulesoft 3.9 and there is an earlier version of the policy already applied to your API,
then remove the policy before applying PingIntelligence 4.3 policy. To remove the
policy, follow the steps explained in Remove existing PingIntelligence policy.
- Log in to your Mulesoft Anypoint account.
- Navigate to the API manager and click on the Version of the
API to which you want to attach the PingIntelligence policy.
- On the API page, click on Policies as shown in the following
illustration.
The Policies page supports applying the PingIntelligence policy to the API. Click on Apply New:
- In the Select Policy pop-up window, select the
PingIntelligence Policy and click on Configure Policy.
- In the Apply policy page, enter the following values:
- ASE Token that was generated as part of prerequisite.
- ASE primary and secondary host and port. The traffic is sent to the ASE secondary host only when the primary ASE node is unreachable.
- Enable SSL for a secure HTTPS connection between Mulesoft and PingIntelligence ASE.
- Check the Allow self-signed certificate check-box to enable Mulesoft to accept a self-signed certificate from ASE.
- Configure the Connection Timeout and Read
Timeout. The behavior of the API gateway is governed by
Connection Timeout and Read Timeout, in the event of API Gateway not able to
connect to ASE or the response from ASE is delayed.
The default value is 5000 milliseconds or Five-seconds. It is a good practice to configure a small value to limit the delay in case ASE is not reachable or unresponsive.Timeout parameter Description Connection Timeout It governs the time the API gateway waits to establish a connection with ASE, following which it sends the client request to the backend server. Read Timeout It governs the time the API Gateway waits for ASE's response before sending the request to the backend server.
Note:If there are any changes to the ASE endpoints, repeat the process explained in step-five and redeploy the configurtion.
- Navigate to your API and click on version number as described in step-one. In the
API page, scroll down to the Deployment Configuration section
and click on Redeploy.
Extracting response metadata for APIs with Basic endpoint
If your API is configured with Basic endpoint on Mulesoft version 3.9.x, then add the
following properties in your Mule application.
http.status
http.reason
content-type
content-length
set-property
element to configure these properties in
the Mule application. If required, you can also set other response side headers to send
more information to the PingIntelligence policy. The following is a sample configuration
of setting response side details. For more information on setting the properties in a
Mule application, see property
transformer.
<set-property propertyName="http.status" value="200" doc:name="Property"/>
<set-property propertyName="http.reason" value="OK" doc:name="Property"/>
<set-property propertyName="content-type" value="application/json" doc:name="Property"/>
<set-property propertyName="content-length" value="21" doc:name="Property"/>
<set-property propertyName="set-cookie" value="PHPSESSIONID=CookieValue" doc:name="Property"/>