28. Monitoring Availability with a Website Status Checker

Imagine one of your responsibilities is being second level support to a vendor app with a status page at http://server1:9000/. Let’s assume the vendor app you’re monitoring the status of has a status page that looks something like this when everything is ok.

Status: Ok

and when something is down it looks like this:

Status: Error! System down

Wouldn’t it be great if you could write a script to run in the background to tell you automatically that it went down?

In this recipe we’ll build a mock website status page indicating system availability. Then we’ll update the system availability to give a negative result. Then we’ll build a status-checker to read the availability and take action based ...

Get Clojure Recipes now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.