How To Configure Health Check Custom Headers With Special Characters In CLI
When configuring Real Server health checks, the LoadMaster provides the ability to add custom headers. When configuring the custom headers to contain special characters, there are limitations that prevent this in the LoadMaster Web User Interface (WUI). When attempting to add a custom header that contains a special character in the LoadMaster WUI, an “Invalid Value (invalid special character)” message appears as shown in the image below.
Figure 1.1 – Adding Custom Headers Containing Special Characters In WUI
To configure custom headers that include special characters, you can use the LoadMaster Command Line Interface (CLI):
- 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.2)
Figure 1.2: Screenshot of the LoadMaster’s Console Screen.
- Switch to Virtual Service configuration mode by using the vip <name|vip> command. Name is the virtual service name and vip is the Virtual Service IP address. (See Figure 1.3)
- Once you are in the Virtual Service configuration mode, use the checkheaders command to configure the custom header, then exit to save the configuration. (See Figure 1.3)
Figure 1.3: Checkheader Command In LoadMaster CLI
The checkheaders command should be followed by the key and key value in quotes. The header name and header value should be separated by the leading colon. (See Figure 1.4)
Figure 1.4: Checkheaders Command Syntax
Figure 1.5: Custom Headers Shown In CLI Show Command
Figure 1.6 – Custom Headers Shown In Packet Capture