Overriding Host Header in Health Monitor using "exact_http_request" or "Use Exact Request"
By default, Avi Vantage inserts additional HTTP headers (Host, User-Agent and Accept) into HTTP health monitor requests. The exact values of these headers are as follows:
For example, if an Avi Vantage admin (user) adds a Host header in HTTP client request data field of a health monitor, Avi Vantage will send this additional Host header together with the existing Host header (Host header inserted by Avi Vantage).
Starting with Avi Vantage release 17.1.6, it is possible to prevent Avi Vantage from adding additional Host header. Use Exact Request option on Avi UI or
use_exact_request flag in Avi CLI for a health monitor instructs Avi Vantage to pass the exact HTTP request string as specified by Avi Vantage admin (user), without any automatic insertion of the additional HTTP headers. This indicates that user is now responsible for adding the appropriate headers to the HTTP client request field.
Configuration from Avi CLI
Login to Avi CLI, and use
configure healthmonitor System-HTTP command to change the value of the flag exact-http-request.
[admin:10-1-1-1]: > configure healthmonitor System-HTTP [admin:10-1-1-1]: healthmonitor> http_monitor [admin:10-1-1-1]: healthmonitor:http_monitor> http_request [admin:10-1-1-1]: healthmonitor:http_monitor> http_request "HEAD / HTTP/1.0\r\n\r\n" Overwriting the previously entered value for http_request [admin:10-1-1-1]: healthmonitor:http_monitor> exact_http_request Overwriting the previously entered value for exact_http_request [admin:10-1-1-1]: healthmonitor:http_monitor> [admin:10-1-1-1]: healthmonitor:http_monitor> save [admin:10-1-1-1]: healthmonitor> save
Configuration from Avi UI
Navigate to Templates>Profiles>Health Monitors, click on the edit icon at the top right to edit health monitors.
Choose the desired HTTP health monitor, select the check box for Use Exact Request and click Save.