XyloSiteMonitor

Artifact [454d2e8a13]
Login

Artifact 454d2e8a13b35532dc48da604c62f114d707f67c54712cc614b7c24478ad11ab:

Wiki page [XyloSiteMonitor] by xylon 2018-11-03 22:06:50.
D 2018-11-03T22:06:50.866
L XyloSiteMonitor
P 396579300142cb2f168e7b3712abd176aeb91684f8e15c4bb0fa6fb2d4cc9f2e
U xylon
W 5097
Websites to be tested are defined in a beautiful [https://en.wikipedia.org/wiki/YAML|YAML] format. XyloSiteMonitor is a python script in a single file which reads these definitions and tests every combination of IPversion, TLS vs no-TLS and www vs no-www.

It produces a nice report and can be told to pass the report to a local mail-server.

Here's some example yaml, that tests Free Software UK:

<verbatim>
- name: Free Software UK
  expected string: Free Software UK
  canonical address: https://www.freesoftwareuk.org.uk/
  urls:
  - url: www.freesoftwareuk.org.uk
    tests:
    - action: return string
      protocols:
        - TLS
    - action: redirect
      protocols:
        - no-TLS
  - url: freesoftwareuk.org.uk
    tests:
    - action: redirect
      protocols:
        - TLS
        - no-TLS
</verbatim>

This translates into all 8 checks required and produces the following output:

<verbatim>
IPv4, does "www.freesoftwareuk.org.uk" return string over "TLS"?                                                                                                                                                   
 Test Success!                                                                                                                                                                                                     
IPv6, does "www.freesoftwareuk.org.uk" return string over "TLS"?                                                                                                                                                   
 Test Success!                                                                                                                                                                                                     
IPv4, does "www.freesoftwareuk.org.uk" redirect over "no-TLS"?                                                                                                                                                     
 Test Success!                                                                                                                                                                                                     
IPv6, does "www.freesoftwareuk.org.uk" redirect over "no-TLS"?                                                                                                                                                     
 Test Success!                                                                                                                                                                                                     
IPv4, does "freesoftwareuk.org.uk" redirect over "TLS"?                                                                                                                                                            
 Test Success!                                                                                                                                                                                                     
IPv6, does "freesoftwareuk.org.uk" redirect over "TLS"?                                                                                                                                                            
 Test Success!                                                                                                                                                                                                     
IPv4, does "freesoftwareuk.org.uk" redirect over "no-TLS"?                                                                                                                                                         
 Test Success!                                                                                                                                                                                                     
IPv6, does "freesoftwareuk.org.uk" redirect over "no-TLS"?                                                                                                                                                         
 Test Success!

Summary:                                                                                                                                                                                                           
8 tests passed                                                                                                                                             
0 tests failed
</verbatim>

To monitor all 10 of my websites like this requires 64 checks. To get this many checks with UptimeRobot would require a Pro plan and it wouldn't allow me to test IPv4 vs 6. Rival service PingDom can do IPv4 or 6 but this many checks would require an "Advanced" plan for £48 GBP per month (ROFL).

If you don't like YAML this probably isn't for you because it's wholly based on YAML.

Dependencies are:
python3
python3-yaml
python3-pycurl

To find out the options please run:

<verbatim>
./xylositemonitor.py --help
</verbatim>
Z d015bbe6243b08253b18ee6dd89181a8