ngx_http_upstream_check_module checking multiple servers

Viewed 14

I'm trying to set up multiple cluster checks in open shift using the free ngx_http_upstream_check_module https://github.com/alibaba/tengine/blob/master/docs/modules/ngx_http_upstream_check_module.md

http status check request comes only when you explicitly specify Host in the check_http_send section

config example

upstream FPK {

server Host1:80;
server Host2:80;
            
check interval=3000 rise=2 fall=5 timeout=5000 type=http;
check_http_send "GET /healthz/ready HTTP/1.1\r\nHOST:Host1\r\n\r\n";
check_http_expect_alive http_2xx http_3xx;
            }              

   server {                
      listen 8090;                               
      location /healthz/ready {    
      proxy_pass http://FPK;

                               }
                                           
      location /nstatus {
      check_status;
      access_log   off;
      allow all;                         

            }
            }

In this example, the check passes, but only on 1 host, I tried to add a host through a variable, but it seems that this module does not support variables and i get error

2022/09/12 09:17:13 [error] 4123691#0: check protocol http error with peer:Host:80

How to pass multiple hosts in the check_http_send section? Thanks in advance for any help

0 Answers
Related