go-http-healtcheck

command module
v0.0.0-...-9e320e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-aws-http-healtcheck

A small go app for health checking endpoints, and collecting other metrics about the base connectivity.

Deploy
  1. Log in to your AWS console

  2. Click this link to prepare the stack.

  3. Add your specific URL, and your phone number for alerts

  4. Click the classic IAM button, and click "Create Stack".

  5. Watch all your resources come alive

  6. Once the stack is done being created, take down the service! Scale to zero, DDOS yourself, do what you do.

  7. Wait for that text message.

Rationale

Golang has some interesting http tracing data that we can pull from the http library. If a request is successful, we can get more information from the request and post that information to a namespace within AWS CloudWatch. I'd like to deploy this with every one of my applications so that I can create default metrics to health endpoints simply for healthcheck.

As far as the metrics or a custom scraper for those metrics, I'm considering putting that into a different repository.

# reports metrics to cloudwatch  
docker run -it --rm -e REGION=us-west-2 -e METRIC_NAME=clustermaestro -e URL="http://my-ip.clustermaestro.com" healthcheck

Metrics

Created in the AWS AppHealth namespace

Metric Name Values Type Description
is-up 1 or 0 milliseconds (dumb I know) Is the site up? 0 means no, 1 means 200 response code was returned
dns-lookup 0 - n milliseconds How long the dns lookup took to complete
server-processing 0 - n milliseconds How long it took for the server to process the request
tcp-connection 0 - n milliseconds How long it took for the tcp connection to be established
tls-handshake 0 - n milliseconds How long the tls handshake took to accomplish
total 0 - n milliseconds Total request time with all that stuff above

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址