The webtest script checks websites for good and bad content, it can be used to check the HTTP status code, the HTTP response headers and the content of the page itself. Check the XML configuration files for examples (in the comments) showing the syntax used.
The script is concurrent so that requests and checks can be done in parallel. If a command line switch --realtime is present the results would be displayed as they're received, otherwise the script would wait until all results are back before displaying them in same order as in the XML.
A default HTTP timeout of 5 seconds is used, but this can be overwritten by --timeout e.g. --timeout 1
The <servers> tags are used when a site is setup on more than one server e.g. a cluster. The idea is to check that the site is setup responding correctly on each of the servers it is configured on, rather than just the one its domain resolves to.
e.g. checking the google site on two of its servers
curl -I -H "Host: www.google.com" 126.96.36.199 curl -I -H "Host: www.google.com" 188.8.131.52If <servers> are not defined then we use where the domain resolves to.
This script requires Python 3 and Requests.