How to Configure Post Health Check Data As Raw Strings
Introduction:
This article assists those configuring a HTTP/HTTPS health check that requires Post Data sent, to not be URL-encoded. Typically, when adding a string to the LoadMaster’s HTTP/HTTPS health check Post Data field, URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal values and normally replaces a space with a plus (+) sign or with %20.
Please see Figure 1.1 below to view how the Real Server HTTP/HTTPS health check Post Data entered in the LoadMaster WUI as:
<Test Data> Sent = To Show /Raw String "Being" <Passed>
Please see Figure 1.2 to show how the Post Data was URL Encoded by the browser and posted as:
%3CTest+Data%3E+Sent+%3D+To+Show+%2FRaw+String+%22Being%22+%3CPassed%3E
Figure 1.1: Real Server Health Check with the string set in the Post Data field:
Figure 1.2: TCP stream showing the string passed being URL-encoded:
Configuration Instructions Using Service Management (CLI):
If the application server being health checked requires the HTTP/HTTPS Post Data to appear in its original form, the following steps must be taken:
- Access the LoadMaster CLI by gaining console access to the LoadMaster, signing in with the bal username and password, and navigating to Service Management (CLI). (See Figure 1.3)
Figure 1.3: Screenshot of the LoadMaster console screen:
- Switch to Virtual Service configuration mode by using the vip <name|vip> command. Vip is the Virtual Service IP address and name is the Virtual Service name. (See Figure 1.4)
- Once you are in the Virtual Service configuration mode, use the checkpostdata command to set the Post Data. (See Figure 1.4)
<Test Data> Sent = To Show /Raw String "Being" <Passed>
- Once you have entered the data using the checkpostdata command, you must return to the top level command level by typing exit for the changes to take effect. (See Figure 1.4)
Figure 1.4: CLI window showing commands used to set Post Data as a raw string:
Figure 1.5: Real Server Health Check with the raw string set in the Post Data field after setting with CLI:
Figure 1.6: TCP stream showing the string passed as a raw string:
Troubleshooting:
To set a raw string as the Post Data, the data must be entered inside single quotes for the double quotes to be passed in the string.
Figure 1.7: How to use single and double quotes in the CLI:
Other than being consistent, use whichever best suits the string.
Using the other type of quote as a literal as shown below:
Checkpostdata “<Test Data> Sent = To Show /Raw String ‘Being’ <Passed>”
Checkpostdata ‘<Test Data> Sent = To Show /Raw String "Being" <Passed>’