AppHealth
AppHealth checks the response for a specific URL on each app server. It does so by overwriting the Host header to the original hostname to trick the app server in serving the correct content. It also speeds up the check by creating a seperate thread for each request and outputs to stdout.
Usage
AppHealth checks for a .apphealth.yml
in either the directory your in or in your home directory. Create this file on a per project basis or just put it in your home dir as a default.
The structure of the confg file needs to be as followed:
default_url: http://domain.com/foo123
servers:
- server01.domain.com
- server02.domain.com
default_url
will be checked when no parameters are supplied to the commandservers
is an array of servers that are requested. It can be of any size.
After creating your config file you can check the app server by running the following command:
`apphealth [url]
url
is an optional url to check, if none is given it will check thedefault_url
from the config.
Gotchas
For this script to work your app servers have to be directly reachable over http(s). I recommend using a VPN connection and only allowing direct access through the VPN. This way you won't expose your app servers to the whole internet directly.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
AppHealth is released under the MIT License.