Git Product home page Git Product logo

Comments (6)

progrium avatar progrium commented on May 27, 2024

Maybe it's better that check-http in docker-consul is silent by default when healthy. Do you want to submit that as an issue against docker-consul?

from registrator.

pfcarrier avatar pfcarrier commented on May 27, 2024

Sure, I will move that to docker-consul were it belong indeed. I will test a few thing and open a PR and an issue there.

Thinking about it, I feel it would be best to remove the timestamp on both success and failure condition. Otherwise, a lasting failed check will also cause consul-haproxy to also reload itself each 5 minutes.

from registrator.

progrium avatar progrium commented on May 27, 2024

Right ... what's producing the timestamp?

from registrator.

pfcarrier avatar pfcarrier commented on May 27, 2024

It's from the http header 'Date' being display by curl in docker-consul:check-http

[default command used]
curl --silent --show-error --fail --dump-header /dev/stderr --retry 2 $opts http://www.google.com > /dev/null

HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.ca/?gfe_rd=cr&ei=En5sVLnlNsSD8Qfft4GgBg <---------
Content-Length: 258
Date: Wed, 19 Nov 2014 11:25:06 GMT <----------
Server: GFE/2.0
Alternate-Protocol: 80:quic,p=0.01

The 'Location' header could also be problematic if it change on each check. Possibly others.

What about a default check-http without --dump-header ? It will be clean and we still have some reporting in case of 4xx/5xx error. This will not trigger constant consul sync as the output won't change at each check, be it a fail or success.

from registrator.

progrium avatar progrium commented on May 27, 2024

Yeah I guess you can always add --dump-header if you want it.

On Wed, Nov 19, 2014 at 5:49 AM, pfcarrier [email protected] wrote:

It's from the http header 'Date' being display by curl in
docker-consul:check-http

[default command used]
curl --silent --show-error --fail --dump-header /dev/stderr --retry 2
$opts http://www.google.com > /dev/null

HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.ca/?gfe_rd=cr&ei=En5sVLnlNsSD8Qfft4GgBg
<---------
Content-Length: 258
Date: Wed, 19 Nov 2014 11:25:06 GMT <----------
Server: GFE/2.0
Alternate-Protocol: 80:quic,p=0.01

The 'Location' header could also be problematic if it change on each
check. Possibly others.

What about a default check-http without --dump-header ? It will be clean
and we still have some reporting in case of 4xx/5xx error. This will not
trigger constant consul sync as the output won't change at each check, be
it a fail or success.


Reply to this email directly or view it on GitHub
https://github.com/progrium/registrator/issues/20#issuecomment-63628721.

Jeff Lindsay
http://progrium.com

from registrator.

progrium avatar progrium commented on May 27, 2024

Dropping support for check-http since Consul has native HTTP checks supported by Registrator now.

from registrator.

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.