0

Is there a way to disable AWS ELB's health check completely? I use a logger middleware (morgan) to log all requests and it's quite annoying for health check requests to get logged every 5min.

  • 5
    Rather than disabling it completely, have your webserver serve a static HTML page (thus bypassing node entirely) and check that URL. Alternatively, morgan appears to have a skip function you can use to exempt certain requests from logging - the ELB sends a particular HTTP user agent string you can look for. – ceejayoz Nov 19 '17 at 16:10
  • I suppose that was technically an answer. Whoops. – ceejayoz Nov 20 '17 at 16:46
2

Rather than disabling it completely, have your webserver serve a static HTML page (thus bypassing node entirely) and check that URL. Alternatively, morgan appears to have a skip function you can use to exempt certain requests from logging - the ELB sends a particular HTTP user agent string (ELB-HealthChecker/1.0, I'd ignore the version number though) you can look for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.