Skip to content

Instantly share code, notes, and snippets.

@tjl2
Created January 28, 2013 12:02
Show Gist options
  • Save tjl2/4654965 to your computer and use it in GitHub Desktop.
Save tjl2/4654965 to your computer and use it in GitHub Desktop.

Local curl check

There are a couple fo ways to piece together the best URL to use when running a local curl check

If the customer has an HTTP monitor

  • Separate out the scheme, domain and path on the URL
  • Find out if we're a solo or within a cluster to find relevant port

If there is no HTTP monitor

  • Find the scheme and hostname to use from the relevant Nginx files
  • Assume a request to app root will be sufficient
  • Find out if we're solo or cluster to find relevant port

Then build curl request

curl $SCHEME://localhost:$PORT/$PATH -kIH 'Host: $HTTPHOST'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment