diff --git a/README.md b/README.md index 10b0fd0..d60d645 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ # check_sites simple python script for checking whether websites are up + +uses 2 simple configuration files: +* "check_sites.conf": specifies the email settings to be used +* "check_sites.json": specifies the sites to check + +takes 2 arguments: +* -f : specifices the path to "check_sites.json" +* -v: specifies "verbose" mode (in non-verbose mode, an email is only sent if any sites DO NOT return a status code of 200) + +best used w/ cron to check a set of websites automatically diff --git a/check_sites.py b/check_sites.py index ed36bd3..d168e97 100644 --- a/check_sites.py +++ b/check_sites.py @@ -82,6 +82,8 @@ def usage(): try: request = urllib2.urlopen(site["url"]) code = request.code + # if you wanted to add more logic or fine-grained detail to the log + # here is where you would do it; using a bunch of if statments on 'code' site.update({ "code": code, "up": True,