Giter Site home page Giter Site logo

Comments (8)

vaijab avatar vaijab commented on July 20, 2024

I believe you're after the following parameter for specifying custom URL:

check_http_send "GET /server-health.asp HTTP/1.0\r\n\r\n";

from nginx_upstream_check_module.

villanus avatar villanus commented on July 20, 2024

@vaijab I just tried what you advised and it did not work.

from nginx_upstream_check_module.

villanus avatar villanus commented on July 20, 2024

I am trying to follow this advice, but have no idea what I am doing:
http://stackoverflow.com/questions/6686261/what-at-the-bare-minimum-is-required-for-an-http-request

from nginx_upstream_check_module.

villanus avatar villanus commented on July 20, 2024

I am having a really hard time from this. I have 3 iis backend servers running on azure. When I turn one of the servers off, this module fails to recognize that the server is off. The reason for this is Azure actually keeps what they call a "cloud service" open and the page still loads. If i completely stop the service then the module assumes my ip address is 0.0.0.0 and again the check comes back healthy.

The original CEP21 version of this module had some features which allowed you to send custom get reuqest and even had healthcheck_expected. I dont really care if expected does not work, but how can i simply send a get request so that if the page doesnt load then it will fail?

How can healtcheck can just check status.php or status.asp and if that gives a status of 304 or 200 then we are ok?

How can i make sure when upstream servers are entered as dnsnames (ww1.mydomain.com, ww2.mydomain.com), when they are down healthcheck doesnt associate their ip address with 0.0.0.0. To test this, just create an upstream server by hostname, and a cname to a server that doesnt exist.

from nginx_upstream_check_module.

villanus avatar villanus commented on July 20, 2024

Please also see this
https://github.com/cep21/healthcheck_nginx_upstreams/blob/master/sample_ngx_config.conf

from nginx_upstream_check_module.

yaoweibin avatar yaoweibin commented on July 20, 2024

Have you specified the virtual host in your IIS backend servers? If so, you should add the host header like this:

check_http_send "GET /server-health.asp HTTP/1.0\r\nHost: yourname.com\r\n\r\n";

The 2xx or 3xx response will be marked as healthy by default.

from nginx_upstream_check_module.

villanus avatar villanus commented on July 20, 2024

Thanks! That worked brialliantly. One thing that would be nice is if rather than putting the hostname "yourname.com" if it would just pull the hostname from the upstream servers. Something like this:
check_http_send "GET /server-health.asp HTTP/1.0\r\nHost: upstream\r\n\r\n";

That way say if each upstream is configured with a distinct virtual host (ww1, ww2, ww3), it would just poll the appropriate url during the health check and result in this:
check_http_send "GET /server-health.asp HTTP/1.0\r\nHost: ww1.mybackenedservers.com\r\n\r\n";
check_http_send "GET /server-health.asp HTTP/1.0\r\nHost: ww2.mybackenedservers.com\r\n\r\n";

from nginx_upstream_check_module.

yaoweibin avatar yaoweibin commented on July 20, 2024

I'm afraid it‘s difficult to know if the user configures the right virtual host name for this upstream. It should be flexiable to add the host in the check_http_send directive.

from nginx_upstream_check_module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.