Configuring 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:

Normal_Behavior_Health_Check.PNG

 

Figure 1.2: TCP stream showing the string passed being URL-encoded:

 Normal_Behavior_URL_Encoding_Shown.PNG

 

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:

  1. 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:

LoadMaster_CLI.PNG

  1. 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)
  2. 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>

  1. 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: Raw_String_Passing.PNG

Figure 1.5: Real Server Health Check with the raw string set in the Post Data field after setting with CLI:

Normal_Behavior_Health_Check.PNG

Figure 1.6: TCP stream showing the string passed as a raw string:

 Raw_String_Passing_TCP_Stream.PNG

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:

single_vs_double_quotes.PNG

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>’

 

Was this article helpful?

0 out of 0 found this helpful

Comments